libretro / virtualjaguar-libretro

Hard fork of Virtual Jaguar (abandoned project) to Libretro
31 stars 34 forks source link

Add core options remap alternative #79

Closed bslenul closed 1 year ago

bslenul commented 1 year ago

Due to limitations of the "Controls" menu it is currently impossible to remap some buttons (Numpad 7, 8, 9, * and #), this PR adds a core option that lets the user remap ANY Jaguar button to any RetroPad button or analog from the core options instead:

image

image

image

So now for example you can remap the straf buttons in Alien vs Predator, previously impossible since it uses Numpad 7 and 9.

Also included an option to be able to bind Numpad buttons to some pre-set keyboard keys (either 1234567890-= on the number row, or 0123456789/* on the keypad), useful if one of the players is using keyboard.

Also backported some fixes from https://github.com/mirror/virtualjaguar/blob/master/src/joystick.cpp while I was at it, because I noticed a weird error while holding Up during my tests (using https://github.com/darthcloud/AtariJaguarPadtest):

image

Not entirely sure if it had any impact in games, but at least it's now fixed:

image

Updated core options to v2, letting me add some descriptions and show/hide the new input options/categories :)

This was more of a learning experiment and I don't think many people care about this core so I didn't plan to make a PR but heh, maybe it could be useful to a few users :p Please feel free to comment, anything I can learn is highly appreciated 👍