Replace runtime critical usages of Dvar::set with Dvar::setRaw in gamepad patch

This commit is contained in:
Jan 2021-09-10 11:41:44 +02:00
parent cc39a7bbe5
commit 8ca84eb882

View File

@ -1023,7 +1023,7 @@ namespace Components
if (std::fabs(value) > 0.0f)
{
gamePad.inUse = true;
gpad_in_use.set(true);
gpad_in_use.setRaw(true);
}
}
@ -1194,7 +1194,7 @@ namespace Components
auto& gamePad = gamePads[gamePadIndex];
gamePad.inUse = true;
gpad_in_use.set(true);
gpad_in_use.setRaw(true);
if (Game::Key_IsKeyCatcherActive(gamePadIndex, Game::KEYCATCH_UI))
CL_GamepadResetMenuScrollTime(gamePadIndex, key, buttonEvent == Game::GPAD_BUTTON_PRESSED, time);
@ -1525,7 +1525,7 @@ namespace Components
}
}
gpad_present.set(gpadPresent);
gpad_present.setRaw(gpadPresent);
}
@ -1821,7 +1821,7 @@ namespace Components
{
// A keyboard key has been pressed. Mark controller as unused.
gamePads[0].inUse = false;
gpad_in_use.set(false);
gpad_in_use.setRaw(false);
// Call original function
Utils::Hook::Call<void(int, int, int, unsigned)>(0x4F6480)(localClientNum, key, down, time);
@ -1837,7 +1837,7 @@ namespace Components
if (dx != 0 || dy != 0)
{
gamePads[0].inUse = false;
gpad_in_use.set(false);
gpad_in_use.setRaw(false);
}
// Call original function