kbeckmann / game-and-watch-retro-go

Emulator collection for Nintendo® Game & Watch™
GNU General Public License v2.0
440 stars 133 forks source link

Have GW take joystick as input #130

Closed BrianPugh closed 3 years ago

BrianPugh commented 3 years ago

Currently, all other emu's use the joystick abstraction as an input; GW does not. This leads to a small bug where when macros are used, the underlying keypresses are still being sent to the emulator because GW directly reads buttons.

bzhxx commented 3 years ago

we can change it in main_gw.c. https://github.com/kbeckmann/game-and-watch-retro-go/blob/1bc9ff8e5d90fb6acbcc41069cd53f86df9889d5/Core/Src/porting/gw/main_gw.c#L53. The emulator is calling gw_get_buttons() everytime the rom program reads inputs. We just need to replace buttons_get() by an operation to convert joystick state in original buttons value.