Qt: Add option to pause when controller is disconnected
This commit is contained in:
@ -3082,6 +3082,9 @@ void FullscreenUI::DrawInterfaceSettingsPage()
|
||||
FSUI_CSTR("Pauses the emulator when you minimize the window or switch to another "
|
||||
"application, and unpauses when you switch back."),
|
||||
"Main", "PauseOnFocusLoss", false);
|
||||
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_GAMEPAD, "Pause On Controller Disconnection"),
|
||||
FSUI_CSTR("Pauses the emulator when a controller with bindings is disconnected."), "Main",
|
||||
"PauseOnControllerDisconnection", false);
|
||||
DrawToggleSetting(
|
||||
bsi, FSUI_ICONSTR(ICON_FA_POWER_OFF, "Confirm Power Off"),
|
||||
FSUI_CSTR("Determines whether a prompt will be displayed to confirm shutting down the emulator/game "
|
||||
@ -3104,10 +3107,7 @@ void FullscreenUI::DrawInterfaceSettingsPage()
|
||||
bsi, FSUI_ICONSTR(ICON_FA_MAGIC, "Inhibit Screensaver"),
|
||||
FSUI_CSTR("Prevents the screen saver from activating and the host from sleeping while emulation is running."),
|
||||
"Main", "InhibitScreensaver", true);
|
||||
DrawToggleSetting(
|
||||
bsi, FSUI_ICONSTR(ICON_FA_COGS, "Apply Per-Game Settings"),
|
||||
FSUI_CSTR("When enabled, per-game settings will be applied, and incompatible enhancements will be disabled."),
|
||||
"Main", "ApplyGameSettings", true);
|
||||
|
||||
if (DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_PAINT_BRUSH, "Use Light Theme"),
|
||||
FSUI_CSTR("Uses a light coloured theme instead of the default dark theme."), "Main",
|
||||
"UseLightFullscreenUITheme", false))
|
||||
@ -6984,6 +6984,7 @@ bool FullscreenUI::IsLeaderboardsWindowOpen()
|
||||
// TRANSLATION-STRING-AREA-BEGIN
|
||||
TRANSLATE_NOOP("FullscreenUI", "%.2f Seconds");
|
||||
TRANSLATE_NOOP("FullscreenUI", "%d Frames");
|
||||
TRANSLATE_NOOP("FullscreenUI", "%d ms");
|
||||
TRANSLATE_NOOP("FullscreenUI", "%d sectors");
|
||||
TRANSLATE_NOOP("FullscreenUI", "-");
|
||||
TRANSLATE_NOOP("FullscreenUI", "1 Frame");
|
||||
@ -7071,7 +7072,6 @@ TRANSLATE_NOOP("FullscreenUI", "An error occurred while deleting empty game sett
|
||||
TRANSLATE_NOOP("FullscreenUI", "An error occurred while saving game settings:\n{}");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Applies modern dithering techniques to further smooth out gradients when true color is enabled.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Apply Image Patches");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Apply Per-Game Settings");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Are you sure you want to clear the current post-processing chain? All configuration will be lost.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Aspect Ratio");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Attempts to detect one pixel high/wide lines that rely on non-upscaled rasterization behavior, filling in gaps introduced by upscaling.");
|
||||
@ -7396,8 +7396,10 @@ TRANSLATE_NOOP("FullscreenUI", "Parent Directory");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Patches");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Patches the BIOS to skip the boot animation. Safe to enable.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Path");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Pause On Controller Disconnection");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Pause On Focus Loss");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Pause On Start");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Pauses the emulator when a controller with bindings is disconnected.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Pauses the emulator when a game is started.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Pauses the emulator when you minimize the window or switch to another application, and unpauses when you switch back.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Per-Game Configuration");
|
||||
@ -7625,7 +7627,6 @@ TRANSLATE_NOOP("FullscreenUI", "When enabled, DuckStation will assume all achiev
|
||||
TRANSLATE_NOOP("FullscreenUI", "When enabled, DuckStation will list achievements from unofficial sets. These achievements are not tracked by RetroAchievements.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "When enabled, each session will behave as if no achievements have been unlocked.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "When enabled, memory cards and controllers will be overwritten when save states are loaded.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "When enabled, per-game settings will be applied, and incompatible enhancements will be disabled.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "When enabled, the minimum supported output latency will be used for the host API.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "When playing a multi-disc game and using per-game (title) memory cards, use a single memory card for all discs.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "When this option is chosen, the clock speed set below will be used.");
|
||||
@ -7644,6 +7645,5 @@ TRANSLATE_NOOP("FullscreenUI", "{} Frames");
|
||||
TRANSLATE_NOOP("FullscreenUI", "{} deleted.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "{} does not exist.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "{} is not a valid disc image.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "%d ms");
|
||||
// TRANSLATION-STRING-AREA-END
|
||||
#endif
|
||||
|
||||
@ -144,6 +144,7 @@ void Settings::Load(SettingsInterface& si)
|
||||
start_paused = si.GetBoolValue("Main", "StartPaused", false);
|
||||
start_fullscreen = si.GetBoolValue("Main", "StartFullscreen", false);
|
||||
pause_on_focus_loss = si.GetBoolValue("Main", "PauseOnFocusLoss", false);
|
||||
pause_on_controller_disconnection = si.GetBoolValue("Main", "PauseOnControllerDisconnection", false);
|
||||
save_state_on_exit = si.GetBoolValue("Main", "SaveStateOnExit", true);
|
||||
create_save_state_backups = si.GetBoolValue("Main", "CreateSaveStateBackups", DEFAULT_SAVE_STATE_BACKUPS);
|
||||
compress_save_states = si.GetBoolValue("Main", "CompressSaveStates", DEFAULT_SAVE_STATE_COMPRESSION);
|
||||
@ -439,12 +440,11 @@ void Settings::Save(SettingsInterface& si, bool ignore_base) const
|
||||
si.SetBoolValue("Main", "StartPaused", start_paused);
|
||||
si.SetBoolValue("Main", "StartFullscreen", start_fullscreen);
|
||||
si.SetBoolValue("Main", "PauseOnFocusLoss", pause_on_focus_loss);
|
||||
si.SetBoolValue("Main", "PauseOnControllerDisconnection", pause_on_controller_disconnection);
|
||||
si.SetBoolValue("Main", "SaveStateOnExit", save_state_on_exit);
|
||||
si.SetBoolValue("Main", "CreateSaveStateBackups", create_save_state_backups);
|
||||
si.SetBoolValue("Main", "CompressSaveStates", compress_save_states);
|
||||
si.SetBoolValue("Main", "ConfirmPowerOff", confim_power_off);
|
||||
si.SetBoolValue("Main", "ApplyCompatibilitySettings", apply_compatibility_settings);
|
||||
si.SetBoolValue("Main", "ApplyGameSettings", apply_game_settings);
|
||||
si.SetBoolValue("Main", "EnableDiscordPresence", enable_discord_presence);
|
||||
}
|
||||
|
||||
|
||||
@ -81,6 +81,7 @@ struct Settings
|
||||
bool start_paused : 1 = false;
|
||||
bool start_fullscreen : 1 = false;
|
||||
bool pause_on_focus_loss : 1 = false;
|
||||
bool pause_on_controller_disconnection : 1 = false;
|
||||
bool save_state_on_exit : 1 = true;
|
||||
bool create_save_state_backups : 1 = DEFAULT_SAVE_STATE_BACKUPS;
|
||||
bool compress_save_states : 1 = DEFAULT_SAVE_STATE_COMPRESSION;
|
||||
|
||||
Reference in New Issue
Block a user