ControllerInterface: Add platform consistent names for modifier keys.

This commit is contained in:
Jordan Woyak committed 2020-09-25 20:29:18 -05:00
1 parent d2729df281
commit f015c99a51
5 files changed
+65

No files matched your search

@@ -87,6 +87,11 @@ KeyboardMouse::KeyboardMouse(const LPDIRECTINPUTDEVICE8 kb_device,
for (u8 i = 0; i < sizeof(named_keys) / sizeof(*named_keys); ++i)
AddInput(new Key(i, m_state_in.keyboard[named_keys[i].code]));
// Add combined left/right modifiers with consistent naming across platforms.
AddCombinedInput("Alt", {"LMENU", "RMENU"});
AddCombinedInput("Shift", {"LSHIFT", "RSHIFT"});
AddCombinedInput("Ctrl", {"LCONTROL", "RCONTROL"});
// MOUSE
DIDEVCAPS mouse_caps = {};
mouse_caps.dwSize = sizeof(mouse_caps);