feat(hotkeys): Add controller overlay hotkey and fix saving bug #14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/hotkey-memory"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This commit addresses a critical bug in the hotkey system that prevented unassigned hotkeys from being saved, and also introduces a new hotkey for the controller overlay.
- Fix: Unassigned Hotkeys Not Saving
Hotkeys assigned to actions that were blank by default (e.g., "Toggle Performance Overlay") would not persist after restarting the application.
The root cause was flawed logic in SaveHotkeys and qt_config.cpp which only considered actions that had a pre-existing default value. The system was blind to any action that started as unassigned.
The SaveHotkeys logic has been rewritten to iterate over all known actions and compare their current state against their default. Only hotkeys that differ from the default are written to the configuration, correctly capturing newly assigned keys.
The LoadHotkeys logic has been improved to first populate the registry with all defaults before applying the user's saved settings.
qt_config.cpp's shortcut functions were simplified to perform straightforward serialization, making the HotkeyRegistry the single source of truth.
- Feature: Add Controller Overlay Hotkey
A new, configurable hotkey for "Toggle Controller Overlay" has been added. I overlooked this during the process of creating the Overlay itself, my mistake.
The action was registered in the default hotkeys list (uisettings.h) and linked to its QAction in main.cpp.
Thanks to user @choyz for letting us know about this issue.
Collecting referenced this pull request2025-11-01 21:11:41 +00:00