[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!)",
"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 hid {
namespace winkey {
@ -406,22 +399,10 @@ X_RESULT WinKeyInputDriver::GetKeystroke(uint32_t user_index, uint32_t flags,
}
} else {
// Handle keydown & keyup:
if (cvars::keyboard_keyup || virtual_key == VK_SHIFT) {
if (evt.transition == false) {
keystroke_flags |= 0x0002; // XINPUT_KEYSTROKE_KEYUP
} else if (evt.transition == true) {
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 (evt.transition == false) {
keystroke_flags |= 0x0002; // XINPUT_KEYSTROKE_KEYUP
} else if (evt.transition == true) {
keystroke_flags |= 0x0001; // XINPUT_KEYSTROKE_KEYDOWN
}
if (keystroke_flags != 0) {