From 1435fc3e9a176113f1b096e03dd8151410bcaf71 Mon Sep 17 00:00:00 2001 From: sukibaby <163092272+sukibaby@users.noreply.github.com> Date: Sat, 12 Apr 2025 07:16:45 -0700 Subject: [PATCH] Slow down frequency at which device strings are updated in controller mapping screen Currently the input mapping screen asks for an updated list of button names every single frame. As this is a bit excessive, it's changed to run every 120ish frames. --- src/ScreenMapControllers.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ScreenMapControllers.cpp b/src/ScreenMapControllers.cpp index bca5cd408b..6f1f9d7948 100644 --- a/src/ScreenMapControllers.cpp +++ b/src/ScreenMapControllers.cpp @@ -279,9 +279,15 @@ void ScreenMapControllers::Update( float fDeltaTime ) } // - // Update devices text + // Update devices text every 120ish frames + // This is NOT updating the actual text shown! + // it is updating the names of the devices here. // - m_textDevices.SetText( INPUTMAN->GetDisplayDevicesString() ); + static uint8_t e= 0; + ++e; + if (e == 0 || e == 127) { + m_textDevices.SetText(INPUTMAN->GetDisplayDevicesString()); + } if( !m_WaitingForPress.IsZero() && m_DeviceIToMap.IsValid() ) // we're going to map an input {