mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Partial SDL2 compatibility
This was SVN commit r11033.
This commit is contained in:
+45
-103
@@ -110,104 +110,19 @@ static SKeycodeMapping keycodeMapping[] =
|
||||
{ SDLK_y, "Y", 0 },
|
||||
{ SDLK_z, "Z", 0 },
|
||||
{ SDLK_DELETE, "Delete", "Del" },
|
||||
/*
|
||||
{ SDLK_WORLD_0, "world 0" },
|
||||
{ SDLK_WORLD_1, "world 1" },
|
||||
{ SDLK_WORLD_2, "world 2" },
|
||||
{ SDLK_WORLD_3, "world 3" },
|
||||
{ SDLK_WORLD_4, "world 4" },
|
||||
{ SDLK_WORLD_5, "world 5" },
|
||||
{ SDLK_WORLD_6, "world 6" },
|
||||
{ SDLK_WORLD_7, "world 7" },
|
||||
{ SDLK_WORLD_8, "world 8" },
|
||||
{ SDLK_WORLD_9, "world 9" },
|
||||
{ SDLK_WORLD_10, "world 10" },
|
||||
{ SDLK_WORLD_11, "world 11" },
|
||||
{ SDLK_WORLD_12, "world 12" },
|
||||
{ SDLK_WORLD_13, "world 13" },
|
||||
{ SDLK_WORLD_14, "world 14" },
|
||||
{ SDLK_WORLD_15, "world 15" },
|
||||
{ SDLK_WORLD_16, "world 16" },
|
||||
{ SDLK_WORLD_17, "world 17" },
|
||||
{ SDLK_WORLD_18, "world 18" },
|
||||
{ SDLK_WORLD_19, "world 19" },
|
||||
{ SDLK_WORLD_20, "world 20" },
|
||||
{ SDLK_WORLD_21, "world 21" },
|
||||
{ SDLK_WORLD_22, "world 22" },
|
||||
{ SDLK_WORLD_23, "world 23" },
|
||||
{ SDLK_WORLD_24, "world 24" },
|
||||
{ SDLK_WORLD_25, "world 25" },
|
||||
{ SDLK_WORLD_26, "world 26" },
|
||||
{ SDLK_WORLD_27, "world 27" },
|
||||
{ SDLK_WORLD_28, "world 28" },
|
||||
{ SDLK_WORLD_29, "world 29" },
|
||||
{ SDLK_WORLD_30, "world 30" },
|
||||
{ SDLK_WORLD_31, "world 31" },
|
||||
{ SDLK_WORLD_32, "world 32" },
|
||||
{ SDLK_WORLD_33, "world 33" },
|
||||
{ SDLK_WORLD_34, "world 34" },
|
||||
{ SDLK_WORLD_35, "world 35" },
|
||||
{ SDLK_WORLD_36, "world 36" },
|
||||
{ SDLK_WORLD_37, "world 37" },
|
||||
{ SDLK_WORLD_38, "world 38" },
|
||||
{ SDLK_WORLD_39, "world 39" },
|
||||
{ SDLK_WORLD_40, "world 40" },
|
||||
{ SDLK_WORLD_41, "world 41" },
|
||||
{ SDLK_WORLD_42, "world 42" },
|
||||
{ SDLK_WORLD_43, "world 43" },
|
||||
{ SDLK_WORLD_44, "world 44" },
|
||||
{ SDLK_WORLD_45, "world 45" },
|
||||
{ SDLK_WORLD_46, "world 46" },
|
||||
{ SDLK_WORLD_47, "world 47" },
|
||||
{ SDLK_WORLD_48, "world 48" },
|
||||
{ SDLK_WORLD_49, "world 49" },
|
||||
{ SDLK_WORLD_50, "world 50" },
|
||||
{ SDLK_WORLD_51, "world 51" },
|
||||
{ SDLK_WORLD_52, "world 52" },
|
||||
{ SDLK_WORLD_53, "world 53" },
|
||||
{ SDLK_WORLD_54, "world 54" },
|
||||
{ SDLK_WORLD_55, "world 55" },
|
||||
{ SDLK_WORLD_56, "world 56" },
|
||||
{ SDLK_WORLD_57, "world 57" },
|
||||
{ SDLK_WORLD_58, "world 58" },
|
||||
{ SDLK_WORLD_59, "world 59" },
|
||||
{ SDLK_WORLD_60, "world 60" },
|
||||
{ SDLK_WORLD_61, "world 61" },
|
||||
{ SDLK_WORLD_62, "world 62" },
|
||||
{ SDLK_WORLD_63, "world 63" },
|
||||
{ SDLK_WORLD_64, "world 64" },
|
||||
{ SDLK_WORLD_65, "world 65" },
|
||||
{ SDLK_WORLD_66, "world 66" },
|
||||
{ SDLK_WORLD_67, "world 67" },
|
||||
{ SDLK_WORLD_68, "world 68" },
|
||||
{ SDLK_WORLD_69, "world 69" },
|
||||
{ SDLK_WORLD_70, "world 70" },
|
||||
{ SDLK_WORLD_71, "world 71" },
|
||||
{ SDLK_WORLD_72, "world 72" },
|
||||
{ SDLK_WORLD_73, "world 73" },
|
||||
{ SDLK_WORLD_74, "world 74" },
|
||||
{ SDLK_WORLD_75, "world 75" },
|
||||
{ SDLK_WORLD_76, "world 76" },
|
||||
{ SDLK_WORLD_77, "world 77" },
|
||||
{ SDLK_WORLD_78, "world 78" },
|
||||
{ SDLK_WORLD_79, "world 79" },
|
||||
{ SDLK_WORLD_80, "world 80" },
|
||||
{ SDLK_WORLD_81, "world 81" },
|
||||
{ SDLK_WORLD_82, "world 82" },
|
||||
{ SDLK_WORLD_83, "world 83" },
|
||||
{ SDLK_WORLD_84, "world 84" },
|
||||
{ SDLK_WORLD_85, "world 85" },
|
||||
{ SDLK_WORLD_86, "world 86" },
|
||||
{ SDLK_WORLD_87, "world 87" },
|
||||
{ SDLK_WORLD_88, "world 88" },
|
||||
{ SDLK_WORLD_89, "world 89" },
|
||||
{ SDLK_WORLD_90, "world 90" },
|
||||
{ SDLK_WORLD_91, "world 91" },
|
||||
{ SDLK_WORLD_92, "world 92" },
|
||||
{ SDLK_WORLD_93, "world 93" },
|
||||
{ SDLK_WORLD_94, "world 94" },
|
||||
{ SDLK_WORLD_95, "world 95" },
|
||||
*/
|
||||
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
{ SDLK_KP_0, "Numpad 0", "Num0" },
|
||||
{ SDLK_KP_1, "Numpad 1", "Num1" },
|
||||
{ SDLK_KP_2, "Numpad 2", "Num2" },
|
||||
{ SDLK_KP_3, "Numpad 3", "Num3" },
|
||||
{ SDLK_KP_4, "Numpad 4", "Num4" },
|
||||
{ SDLK_KP_5, "Numpad 5", "Num5" },
|
||||
{ SDLK_KP_6, "Numpad 6", "Num6" },
|
||||
{ SDLK_KP_7, "Numpad 7", "Num7" },
|
||||
{ SDLK_KP_8, "Numpad 8", "Num8" },
|
||||
{ SDLK_KP_9, "Numpad 9", "Num9" },
|
||||
#else
|
||||
{ SDLK_KP0, "Numpad 0", "Num0" },
|
||||
{ SDLK_KP1, "Numpad 1", "Num1" },
|
||||
{ SDLK_KP2, "Numpad 2", "Num2" },
|
||||
@@ -218,6 +133,8 @@ static SKeycodeMapping keycodeMapping[] =
|
||||
{ SDLK_KP7, "Numpad 7", "Num7" },
|
||||
{ SDLK_KP8, "Numpad 8", "Num8" },
|
||||
{ SDLK_KP9, "Numpad 9", "Num9" },
|
||||
#endif
|
||||
|
||||
{ SDLK_KP_PERIOD, "Numpad .", "NumPoint" },
|
||||
{ SDLK_KP_DIVIDE, "Numpad /", "NumDivide" },
|
||||
{ SDLK_KP_MULTIPLY, "Numpad *", "NumMultiply" },
|
||||
@@ -252,29 +169,55 @@ static SKeycodeMapping keycodeMapping[] =
|
||||
{ SDLK_F14, "F14", 0 },
|
||||
{ SDLK_F15, "F15", 0 },
|
||||
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
{ SDLK_NUMLOCKCLEAR, "Num Lock", "NumLock" },
|
||||
#else
|
||||
{ SDLK_NUMLOCK, "Num Lock", "NumLock" },
|
||||
#endif
|
||||
|
||||
{ SDLK_CAPSLOCK, "Caps Lock", "CapsLock" },
|
||||
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
{ SDLK_SCROLLLOCK, "Scroll Lock", "ScrlLock" },
|
||||
#else
|
||||
{ SDLK_SCROLLOCK, "Scroll Lock", "ScrlLock" },
|
||||
#endif
|
||||
|
||||
{ SDLK_RSHIFT, "Right Shift", "RightShift" },
|
||||
{ SDLK_LSHIFT, "Left Shift", "LeftShift" },
|
||||
{ SDLK_RCTRL, "Right Ctrl", "RightCtrl" },
|
||||
{ SDLK_LCTRL, "Left Ctrl", "LeftCtrl" },
|
||||
{ SDLK_RALT, "Right Alt", "RightAlt" },
|
||||
{ SDLK_LALT, "Left Alt", "LeftAlt" },
|
||||
{ SDLK_RMETA, "Right Meta", 0 }, // ?
|
||||
{ SDLK_LMETA, "Left Meta", 0 }, // ?
|
||||
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
{ SDLK_LGUI, "Left Super", "LeftWin" }, /* "Windows" keys */
|
||||
{ SDLK_RGUI, "Right Super", "RightWin" },
|
||||
#else
|
||||
{ SDLK_LSUPER, "Left Super", "LeftWin" }, /* "Windows" keys */
|
||||
{ SDLK_RSUPER, "Right Super", "RightWin" },
|
||||
#endif
|
||||
|
||||
{ SDLK_MODE, "Alt Gr", "AltGr" },
|
||||
{ SDLK_COMPOSE, "Compose", 0 }, // ?
|
||||
|
||||
{ SDLK_HELP, "Help", 0 }, // ?
|
||||
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
{ SDLK_PRINTSCREEN, "Print Screen", "PrtSc" },
|
||||
#else
|
||||
{ SDLK_PRINT, "Print Screen", "PrtSc" },
|
||||
#endif
|
||||
|
||||
{ SDLK_SYSREQ, "SysRq", 0 },
|
||||
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
{ SDLK_STOP, "Break", 0 },
|
||||
#else
|
||||
{ SDLK_BREAK, "Break", 0 },
|
||||
#endif
|
||||
|
||||
{ SDLK_MENU, "Menu", 0 }, // ?
|
||||
{ SDLK_POWER, "Power", 0 }, // ?
|
||||
{ SDLK_EURO, "Euro", 0 },
|
||||
{ SDLK_UNDO, "Undo", 0 }, // ?
|
||||
{ MOUSE_LEFT, "Left Mouse Button", "MouseLeft" },
|
||||
{ MOUSE_RIGHT, "Right Mouse Button", "MouseRight" },
|
||||
@@ -286,7 +229,6 @@ static SKeycodeMapping keycodeMapping[] =
|
||||
{ UNIFIED_SHIFT, "Shift", "AnyShift" },
|
||||
{ UNIFIED_CTRL, "Ctrl", "AnyCtrl" },
|
||||
{ UNIFIED_ALT, "Alt", "AnyAlt" },
|
||||
{ UNIFIED_META, "Meta", "AnyMeta" },
|
||||
{ UNIFIED_SUPER, "Super", "AnyWindows" },
|
||||
{ 0, 0, 0 },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user