mirror of
https://github.com/libretro/Libretro-Supermodel.git
synced 2026-11-10 11:11:26 -10:00
No keyboard mapping has ever worked in this core. CInputSystem strips the KEY_ prefix before calling GetKeyIndex(), so the core received "D" while its table compared "KEY_D", and every KEY_* entry in Supermodel.ini was ignored. The keyboard only worked through RetroArch's keyboard-to-RetroPad binds. GetKeyIndex() now covers every key name Supermodel accepts (as in the SDL build, the generic SHIFT, CTRL and ALT have no single libretro key and stay unmapped). It returns the key's position in the table rather than a RETROK code, because CInputSystem uses the value to index its key source arrays; IsKeyPressed() and GetKeyName() translate it back. The default mappings keep the keys that cannot clash with RetroArch's default binds: 1-8 (start, coin, service, test) and the arrow keys, which only repeat what the D-pad already does. The letter keys and Space are dropped. With RetroArch's default binds they would have fired together with the pad buttons the same keys are bound to (in Virtua Fighter 3, A would press Punch and Guard together), and F is RetroArch's fullscreen hotkey. Players keep today's behaviour, and KEY_* entries added to Supermodel.ini now work. The bundled Supermodel.ini is regenerated to match. Tested: Virtua Fighter 3 with RetroArch's default keyboard binds: 3 inserts a coin and 1 starts, arrows move, z/x/a/s each trigger one action through the pad binds, d does nothing and f only toggles fullscreen, 6 enters and leaves the test menu. Star Wars Trilogy, Scud Race and The Lost World load and run.