RetroPie-Setup icon indicating copy to clipboard operation
RetroPie-Setup copied to clipboard

mupen64plus: update runtime hotkey configuration

Open cmitu opened this issue 2 years ago • 2 comments

The Mupen64plus start-up script adds 3 'hotkey' combinations for the connected joysticks by looking at the RetroArch auto-config profile(s) for the joysticks.

To handle cases when the SDL joystick name (used by Mupen64Plus) is different than the 'udev' name and the auto-config profile is not found just by looking at the filename, an additional search for the profile .cfg files was added - using the 'vendor' and 'product' IDs of the joystick. This takes advantage of the changes in e392c7ac for the input configuration, which save 'vendor'/'product' IDs to the RetroArch's auto-config profile.

I re-organized a bit the hotkey bindings loop so it's indexed by the number of joysticks detected. This avoids searching for the auto-config profile 3 times (# of hotkey bindings), which can is more expensive when using grep to look up the vendor/product IDs. Since 'bind' is a reserved built-in in Bash, I renamed it to hotkeys_bind, similar to the other arrays used for hotkeys set-up.

cmitu avatar Apr 17 '23 06:04 cmitu

I've set it to draft since it may have merge issues after #3696 is merged, but the implementation (pending review changes) should be ok.

cmitu avatar Apr 17 '23 06:04 cmitu

I've removed the draft status, was waiting for https://github.com/RetroPie/RetroPie-Setup/pull/3696 to be merged just to check for conflicts, but that may take more time.

cmitu avatar Jun 07 '24 08:06 cmitu