mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-10-06 07:21:36 +02:00
Update to v094r11 release.
byuu says: I've hooked up the input subsystem, and the input manager to assign hotkeys. So far I only have digital buttons working (keyboard only), and I'm not planning on supporting input groups again (mapping multiple physical buttons to one emulated button), but it's progress. As with the rest of tomoko, the code's a lot more compact. The nice thing about redoing code so many times is that each time you get a little bit better at it. The input configuration is saved to ~/.config/tomoko/settings.bml (just realized that I'm an idiot and need to rename it to input.bml) Also hooked up game saves and cartridge unloading. Active controller changing isn't hooked up yet, and I'll probably do it differently. Oh, and I declared the ruby lines for other platforms. Still need to add Cydrak's Windows compilation fixes. I am nothing if not lazy :P
This commit is contained in:
@@ -10,7 +10,11 @@ auto Program::loadRequest(unsigned id, string path) -> void {
|
||||
return emulator().load(id, stream);
|
||||
}
|
||||
|
||||
//request from emulation core to save non-volatile media file
|
||||
auto Program::saveRequest(unsigned id, string path) -> void {
|
||||
string location = {mediaPaths(emulator().group(id)), path};
|
||||
filestream stream{location, file::mode::write};
|
||||
return emulator().save(id, stream);
|
||||
}
|
||||
|
||||
auto Program::videoColor(unsigned source, uint16 alpha, uint16 red, uint16 green, uint16 blue) -> uint32 {
|
||||
@@ -62,6 +66,10 @@ auto Program::audioSample(int16 lsample, int16 rsample) -> void {
|
||||
}
|
||||
|
||||
auto Program::inputPoll(unsigned port, unsigned device, unsigned input) -> int16 {
|
||||
auto guid = emulator().port[port].device[device].input[input].guid;
|
||||
auto mapping = (InputMapping*)guid;
|
||||
if(mapping) return mapping->poll();
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto Program::inputRumble(unsigned port, unsigned device, unsigned input, bool enable) -> void {
|
||||
|
Reference in New Issue
Block a user