Backported KeepWeaponSelectMode from 4.x

Minor edits to code and documents.
This commit is contained in:
NovaRain
2020-09-16 11:09:55 +08:00
parent ff1aac40f5
commit 3479bc6893
6 changed files with 76 additions and 5 deletions
+1 -1
View File
@@ -260,7 +260,7 @@ public:
if (DeviceType != kDeviceType_KEYBOARD) {
return RealDevice->GetDeviceData(a, buf, count, d);
}
if (!buf && !d && *count == INFINITE) { // flush
if (*count == INFINITE && !buf && !d) { // flush
while (!bufferedPresses.empty()) bufferedPresses.pop();
return RealDevice->GetDeviceData(a, buf, count, d);
}