Make StreamingPreferences a proper singleton

This removes the need for several hacks in SettingsView to force updates and improves performance by not reloading preferences all over the place.
This commit is contained in:
Cameron Gutman
2024-04-14 13:01:30 -05:00
parent ebe270bec5
commit d1ccd19fcc
9 changed files with 68 additions and 56 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ class SdlGamepadKeyNavigation : public QObject
Q_OBJECT
public:
SdlGamepadKeyNavigation();
SdlGamepadKeyNavigation(StreamingPreferences* prefs);
~SdlGamepadKeyNavigation();
@@ -31,11 +31,11 @@ private slots:
void onPollingTimerFired();
private:
StreamingPreferences* m_Prefs;
QTimer* m_PollingTimer;
QList<SDL_GameController*> m_Gamepads;
bool m_Enabled;
bool m_UiNavMode;
bool m_FirstPoll;
Uint32 m_LastAxisNavigationEventTime;
StreamingPreferences m_Prefs;
};