Fixed XInputGetKeystroke.
This commit is contained in:
parent
8176df3ac6
commit
eae8197025
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue