summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/input/input_common.cpp
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2019-02-16 16:44:21 +0100
committer couriersud <couriersud@gmx.org>2019-02-16 16:44:42 +0100
commit757436bbfba420a8bc35ee99c2be93ecf125df84 (patch)
tree5475e0fde29990f5575277dbf265044564ab8db3 /src/osd/modules/input/input_common.cpp
parent983ffa2de6b409709a41d28aa1690604c7efc1b7 (diff)
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.
Diffstat (limited to 'src/osd/modules/input/input_common.cpp')
-rw-r--r--src/osd/modules/input/input_common.cpp6
1 files changed, 4 insertions, 2 deletions
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 <SDL2/SDL.h>
-#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[] =
{