ControllerInterface: Add platform consistent names for modifier keys.

This commit is contained in:
Jordan Woyak
2019-10-25 19:33:59 -05:00
parent d2729df281
commit f015c99a51
5 changed files with 65 additions and 0 deletions

View File

@ -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);