[HID] Remove keyboard_keyup cvar, doesn't seem needed anymore

I guess something to get CoD4 console working must have fixed SR1 double-keypress issue!
This commit is contained in:
emoose 2020-01-15 06:51:25 +00:00 committed by illusion
parent 28478e440c
commit 579f5ebbfa
1 changed files with 4 additions and 23 deletions

View File

@ -21,13 +21,6 @@ DEFINE_bool(keyboard_passthru, false,
"Xenia keybinds, eg. H to show FPS, will still be in effect!)", "Xenia keybinds, eg. H to show FPS, will still be in effect!)",
"HID"); "HID");
DEFINE_bool(
keyboard_keyup, true,
"When using passthru, sends keyup events when keys are released. Some "
"games like SR1 don't like "
"seeing these, but dash won't work properly without them",
"HID");
namespace xe { namespace xe {
namespace hid { namespace hid {
namespace winkey { namespace winkey {
@ -406,23 +399,11 @@ X_RESULT WinKeyInputDriver::GetKeystroke(uint32_t user_index, uint32_t flags,
} }
} else { } else {
// Handle keydown & keyup: // Handle keydown & keyup:
if (cvars::keyboard_keyup || virtual_key == VK_SHIFT) {
if (evt.transition == false) { if (evt.transition == false) {
keystroke_flags |= 0x0002; // XINPUT_KEYSTROKE_KEYUP keystroke_flags |= 0x0002; // XINPUT_KEYSTROKE_KEYUP
} else if (evt.transition == true) { } else if (evt.transition == true) {
keystroke_flags |= 0x0001; // XINPUT_KEYSTROKE_KEYDOWN keystroke_flags |= 0x0001; // XINPUT_KEYSTROKE_KEYDOWN
} }
} else {
if (!cvars::keyboard_keyup) {
// Only handle keydown, since some stupid games will count keyup as
// another keypress (seen in SR1..)
if (virtual_key != 0 && virtual_key != VK_SHIFT) {
if (evt.transition) {
keystroke_flags |= 0x0001;
}
}
}
}
if (keystroke_flags != 0) { if (keystroke_flags != 0) {
WCHAR buf; WCHAR buf;