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.
This commit is contained in:
sukibaby
2025-04-12 07:16:45 -07:00
committed by teejusb
parent bfa9d3f600
commit 1435fc3e9a
+8 -2
View File
@@ -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
{