Analog stick autorotation now uses game timing.

Should fix frameskipping problem, where this didn't work in God of War
if frameskipping was on.
This commit is contained in:
Henrik Rydgård committed 2026-03-31 11:14:48 -06:00
1 parent e2f8db5e9f
commit f703bc69c4
5 files changed
+12 -4

No files matched your search

+4 -1
View File
@@ -651,8 +651,11 @@ void ControlMapper::Axis(const AxisInput *axes, size_t count) {
KeyMap::UnlockMappings();
}
void ControlMapper::Update(const DisplayLayoutConfig &config, double now) {
void ControlMapper::UpdateConfig(const DisplayLayoutConfig &config) {
iInternalScreenRotationCached_ = config.bRotateControlsWithScreen ? config.iInternalScreenRotation : ROTATION_LOCKED_HORIZONTAL;
}
void ControlMapper::UpdateAutoMovements(double now) {
if (autoRotatingAnalogCW_) {
// Clamp to a square
float x = std::min(1.0f, std::max(-1.0f, 1.42f * (float)cos(now * -g_Config.fAnalogAutoRotSpeed)));