From eae8197025e2334026c782f696f2e1aac6c4b20b Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Fri, 6 Feb 2015 00:11:17 -0800 Subject: [PATCH] Fixed XInputGetKeystroke. --- src/xenia/hid/xinput/xinput_input_driver.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/xenia/hid/xinput/xinput_input_driver.cc b/src/xenia/hid/xinput/xinput_input_driver.cc index 1a19bc74a..d11bb69ab 100644 --- a/src/xenia/hid/xinput/xinput_input_driver.cc +++ b/src/xenia/hid/xinput/xinput_input_driver.cc @@ -86,13 +86,11 @@ X_RESULT XInputInputDriver::GetKeystroke(uint32_t user_index, uint32_t flags, // flags is reserved on desktop. XINPUT_KEYSTROKE native_keystroke; DWORD result = XInputGetKeystroke(user_index, flags, &native_keystroke); - if (result == ERROR_SUCCESS) { - out_keystroke->virtual_key = native_keystroke.VirtualKey; - out_keystroke->unicode = native_keystroke.Unicode; - out_keystroke->flags = native_keystroke.Flags; - out_keystroke->user_index = native_keystroke.UserIndex; - out_keystroke->hid_code = native_keystroke.HidCode; - } + out_keystroke->virtual_key = native_keystroke.VirtualKey; + out_keystroke->unicode = native_keystroke.Unicode; + out_keystroke->flags = native_keystroke.Flags; + out_keystroke->user_index = native_keystroke.UserIndex; + out_keystroke->hid_code = native_keystroke.HidCode; // X_ERROR_EMPTY if no new keys // X_ERROR_DEVICE_NOT_CONNECTED if no device // X_ERROR_SUCCESS if key