Qt/ImGui: Fix settings not syncing from FullscreenUI to Qt widgets
Fixes #12750
https://github.com/user-attachments/assets/72ab268b-33d6-45a4-b79c-810fc1600c98
Description of Changes
Enables two-way synchronization of settings between the ImGui FullscreenUI and the Qt settings dialogs:
- Adds a new notification entry point in
Host(OnSettingsChangedExternally) and calls it from FullscreenUI. - Exposes and wires up Qt handlers to refresh every settings widget when that notification fires.
Rationale behind Changes
The existing settings system had one-way communication: Qt UI changes would reflect in FSUI, but FSUI changes would not reflect back to Qt UI widgets. This created an inconsistent user experience where:
- Changing "Maximum Frame Latency" from 2 to 3 in Qt immediately showed in FSUI
- Changing "Maximum Frame Latency" from 2 to 3 in FSUI did NOT show in Qt
- New Host Notification System
- Added
Host::OnSettingsChangedExternally()notification entry point inQtHost.cpp - This function runs on the UI thread and notifies the settings window of external changes
- FullscreenUI Integration
- FullscreenUI setting change handlers now invoke the new notification system
- Ensures Qt widgets are refreshed whenever settings change in FullscreenUI
- Qt Widget Auto-Refresh
- Connected all settings widgets to the
externalSettingsChangedsignal - Each widget now automatically refreshes its state when external changes occur
- Added refresh logic for each settings page:
Suggested Testing Steps
-
Open both UIs:
- Launch PCSX2 and open a Qt settings window (e.g., Emulation settings)
- Go into FSUI
-
Test FSUI -> Qt sync:
- Change a setting in FSUI (e.g., "Maximum Frame Latency" from default to a different value)
- Verify the Qt settings window automatically updates to show the new value
-
Test Qt -> FSUI sync (already working):
- Change a setting in Qt UI
- Verify FSUI shows the updated value
-
Test multiple settings:
- Repeat with other settings like vsync, aspect ratio, etc.
- Verify bidirectional sync works for all tested settings
Did you use AI to help find, test, or implement this issue or feature?
I did not use it for my code but it did help me with grammar and better helping understand why this should be added
~~Didn't realize I needed to add a stub to StubHost.cpp will do that tomorrow and should fix cmake issues. Then as Tellow recommended I'm going to start trying to add a reload function to call to update the widgets in place. Instead of reloading the Qt settings windows like that.~~ All done :)
It looks like the Output Volume in the FSUI fails to sync with the slider in Qt's Audio tab.
Hmm... I'll take a look
Alright I am going to fix all of them apparently I forgot to make it to where all the settings synced. I'll start later
I'm honestly just going to redo this now that I have more experience with the PCSX2 repo structure