[HID] Fixed issue with controller input introduced in previous commit.

Added option to switch keyboard working mode.
This commit is contained in:
Gliniak
2024-12-18 09:39:52 +01:00
parent f6ae651cc2
commit ef8619b0a8
4 changed files with 49 additions and 40 deletions

View File

@@ -200,9 +200,6 @@ X_RESULT XInputInputDriver::GetKeystroke(uint32_t user_index, uint32_t flags,
// flags is reserved on desktop.
DWORD result;
if ((flags & XINPUT_FLAG_KEYBOARD) != 0) {
return X_ERROR_INVALID_PARAMETER;
}
// XInputGetKeystroke on Windows has a bug where it will return
// ERROR_SUCCESS (0) even if the device is not connected:
// https://stackoverflow.com/questions/23669238/xinputgetkeystroke-returning-error-success-while-controller-is-unplugged