JaCzekanski / Avocado

🥑 PlayStation 1 emulator
GNU General Public License v2.0
536 stars 31 forks source link

Added hotkey configuration menu #90

Closed yuupo123 closed 3 years ago

yuupo123 commented 3 years ago

Not a c ++ programmer, but it might be useful

JaCzekanski commented 3 years ago

Looks great! Thanks for contributing. Could you take a look at non-Windows builds? Looks like somethings wrong there:

../../../src/platform/windows/input/key.h:40:22: error: extra qualification on member 'getName'
    const char* Key::getName();

One thing I don't like is how Soft/Hard reset is handled, but to be honest, it's a limitation of the current key mapping system - keyboard|F2 doesn't allow you to specify modifiers like Shift.

Also, it won't work if somebody was to map a hotkey to something else than a keyboard - for example, I could map quick save/load to a game controller, but that would fail due to hardcoded keyboard event check

if (event.key.keysym.sym == Key(config.hotkeys["quick_load"]).key)

There are some modifications needed to SdlInputManager to handle it, but for now, we can leave it as it.

JaCzekanski commented 3 years ago

Tested - works great :)

Ignore failing Android builds - I forgot to merge another branch where that was fixed.