From 757436bbfba420a8bc35ee99c2be93ecf125df84 Mon Sep 17 00:00:00 2001 From: couriersud Date: Sat, 16 Feb 2019 16:44:21 +0100 Subject: Fixed sdl2 keymap processing. [Couriersud] Keymaps must have been broken for ages: - It is now possible to map every scancode SDL2 defines. - Removed keycode field. This was a leftover from SDL1.x - Fixed bug preventing keymaps from working. - Fixed the DE keymap. - Converted other keymaps to new format and added a comment that they have to be reviewed and fixed. --- src/osd/modules/input/input_common.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/osd/modules/input/input_common.cpp') diff --git a/src/osd/modules/input/input_common.cpp b/src/osd/modules/input/input_common.cpp index 7c952ac05a4..ab51b6bbe34 100644 --- a/src/osd/modules/input/input_common.cpp +++ b/src/osd/modules/input/input_common.cpp @@ -34,8 +34,8 @@ #elif defined(OSD_SDL) // SDL include #include -#define KEY_TRANS_ENTRY0(mame, sdlsc, sdlkey, disc, virtual, uwp, ascii, UI) { ITEM_ID_##mame, SDL_SCANCODE_ ## sdlsc, SDLK_ ## sdlkey, ascii, "ITEM_ID_"#mame, (char *) UI } -#define KEY_TRANS_ENTRY1(mame, sdlsc, sdlkey, disc, virtual, uwp, ascii) { ITEM_ID_##mame, SDL_SCANCODE_ ## sdlsc, SDLK_ ## sdlkey, ascii, "ITEM_ID_"#mame, (char*) #mame } +#define KEY_TRANS_ENTRY0(mame, sdlsc, sdlkey, disc, virtual, uwp, ascii, UI) { ITEM_ID_##mame, SDL_SCANCODE_ ## sdlsc, ascii, "ITEM_ID_"#mame, (char *) UI } +#define KEY_TRANS_ENTRY1(mame, sdlsc, sdlkey, disc, virtual, uwp, ascii) { ITEM_ID_##mame, SDL_SCANCODE_ ## sdlsc, ascii, "ITEM_ID_"#mame, (char*) #mame } #elif defined(OSD_UWP) #define KEY_TRANS_ENTRY0(mame, sdlsc, sdlkey, disc, virtual, uwp, ascii, UI) { ITEM_ID_##mame, KEY_ ## disc, Windows::System::VirtualKey:: ## uwp, ascii, "ITEM_ID_"#mame, (char *) UI } #define KEY_TRANS_ENTRY1(mame, sdlsc, sdlkey, disc, virtual, uwp, ascii) { ITEM_ID_##mame, KEY_ ## disc, Windows::System::VirtualKey:: ## uwp, ascii, "ITEM_ID_"#mame, (char*) #mame } @@ -43,6 +43,8 @@ // osd mini #endif +// FIXME: sdl_key can be removed from the table below. It is no longer used. + #if defined(OSD_WINDOWS) || defined(OSD_SDL) || defined(OSD_UWP) key_trans_entry keyboard_trans_table::s_default_table[] = { -- cgit v1.2.3-70-g09d2