From 9ea04038799634622ce221779586ec3f33699d1f Mon Sep 17 00:00:00 2001 From: icenine451 Date: Thu, 18 May 2023 11:38:20 -0400 Subject: [PATCH] Add PPSSPP to savestate_auto_load preset Add Citra/Dolphin/Duckstation/PCSX2/Primehack/Yuzu to ask_to_exit preset Reconfigure defaults and existing installs for proper preset functions Add Ask-to-Exit menu item in Configurator --- emu-configs/citra/qt-config.ini | 6 +++--- .../defaults/retrodeck/presets/citra_presets.cfg | 2 ++ .../defaults/retrodeck/presets/dolphin_presets.cfg | 4 ++++ .../retrodeck/presets/duckstation_presets.cfg | 1 + .../defaults/retrodeck/presets/pcsx2_presets.cfg | 1 + .../defaults/retrodeck/presets/ppsspp_presets.cfg | 4 ++++ .../defaults/retrodeck/presets/primehack_presets.cfg | 4 ++++ .../defaults/retrodeck/presets/yuzu_presets.cfg | 2 ++ .../reference_lists/pretty_system_names.cfg | 11 +++++++---- emu-configs/defaults/retrodeck/retrodeck.cfg | 9 +++++++++ emu-configs/dolphin/Dolphin.ini | 4 ++-- emu-configs/duckstation/settings.ini | 2 +- emu-configs/ppssppsdl/ppsspp.ini | 4 ++-- emu-configs/primehack/Dolphin.ini | 2 +- functions/global.sh | 6 +++++- functions/post_update.sh | 12 +++++++++++- tools/configurator.sh | 9 ++++++++- 17 files changed, 67 insertions(+), 16 deletions(-) create mode 100644 emu-configs/defaults/retrodeck/presets/dolphin_presets.cfg create mode 100644 emu-configs/defaults/retrodeck/presets/ppsspp_presets.cfg create mode 100644 emu-configs/defaults/retrodeck/presets/primehack_presets.cfg diff --git a/emu-configs/citra/qt-config.ini b/emu-configs/citra/qt-config.ini index cb966272..6a74fd56 100644 --- a/emu-configs/citra/qt-config.ini +++ b/emu-configs/citra/qt-config.ini @@ -474,8 +474,8 @@ Updater\update_on_close=false Updater\update_on_close\default=true calloutFlags=1 calloutFlags\default=false -confirmClose=true -confirmClose\default=true +confirmClose=false +confirmClose\default=false displayTitleBars=true displayTitleBars\default=true enable_discord_presence=true @@ -532,4 +532,4 @@ citra_username=RetroDECK enable_telemetry=false enable_telemetry\default=false web_api_url=https://api.citra-emu.org -web_api_url\default=true \ No newline at end of file +web_api_url\default=true diff --git a/emu-configs/defaults/retrodeck/presets/citra_presets.cfg b/emu-configs/defaults/retrodeck/presets/citra_presets.cfg index 84379ca3..9211d5c0 100644 --- a/emu-configs/defaults/retrodeck/presets/citra_presets.cfg +++ b/emu-configs/defaults/retrodeck/presets/citra_presets.cfg @@ -1,6 +1,8 @@ config_file_format^citra target_file^$citraconf defaults_file^$emuconfigs/citra/qt-config.ini +change^ask_to_exit^confirmClose^true^UI +change^ask_to_exit^confirmClose\default^true^UI change^nintendo_button_layout^profiles\1\button_a^button:1,engine:sdl,guid:030079f6de280000ff11000001000000,port:0^Controls change^nintendo_button_layout^profiles\1\button_b^button:0,engine:sdl,guid:030079f6de280000ff11000001000000,port:0^Controls change^nintendo_button_layout^profiles\1\button_x^button:3,engine:sdl,guid:030079f6de280000ff11000001000000,port:0^Controls diff --git a/emu-configs/defaults/retrodeck/presets/dolphin_presets.cfg b/emu-configs/defaults/retrodeck/presets/dolphin_presets.cfg new file mode 100644 index 00000000..234012e9 --- /dev/null +++ b/emu-configs/defaults/retrodeck/presets/dolphin_presets.cfg @@ -0,0 +1,4 @@ +config_file_format^dolphin +target_file^$dolphinconf +defaults_file^$emuconfigs/dolphin/Dolphin.ini +change^ask_to_exit^ConfirmStop^True^Interface diff --git a/emu-configs/defaults/retrodeck/presets/duckstation_presets.cfg b/emu-configs/defaults/retrodeck/presets/duckstation_presets.cfg index d25d2deb..76c9f926 100644 --- a/emu-configs/defaults/retrodeck/presets/duckstation_presets.cfg +++ b/emu-configs/defaults/retrodeck/presets/duckstation_presets.cfg @@ -7,3 +7,4 @@ change^cheevos^Token^$cheevos_token^Cheevos change^cheevos^LoginTimestamp^$cheevos_login_timestamp^Cheevos change^cheevos_hardcore^ChallengeMode^true^Cheevos change^savestate_auto_save^SaveStateOnExit^true^Main +change^ask_to_exit^ConfirmPowerOff^true^Main diff --git a/emu-configs/defaults/retrodeck/presets/pcsx2_presets.cfg b/emu-configs/defaults/retrodeck/presets/pcsx2_presets.cfg index 829c66d2..ba01d17c 100644 --- a/emu-configs/defaults/retrodeck/presets/pcsx2_presets.cfg +++ b/emu-configs/defaults/retrodeck/presets/pcsx2_presets.cfg @@ -7,3 +7,4 @@ change^cheevos^Token^$cheevos_token^Achievements change^cheevos^LoginTimestamp^$cheevos_login_timestamp^Achievements change^cheevos_hardcore^ChallengeMode^true^Achievements change^savestate_auto_save^SaveStateOnShutdown^true^EmuCore +change^ask_to_exit^ConfirmShutdown^true^UI diff --git a/emu-configs/defaults/retrodeck/presets/ppsspp_presets.cfg b/emu-configs/defaults/retrodeck/presets/ppsspp_presets.cfg new file mode 100644 index 00000000..90094d5e --- /dev/null +++ b/emu-configs/defaults/retrodeck/presets/ppsspp_presets.cfg @@ -0,0 +1,4 @@ +config_file_format^ppsspp +target_file^$ppssppconf +defaults_file^$emuconfigs/PCSX2/PCSX2.ini +change^savestate_auto_load^AutoLoadSaveState^2^General diff --git a/emu-configs/defaults/retrodeck/presets/primehack_presets.cfg b/emu-configs/defaults/retrodeck/presets/primehack_presets.cfg new file mode 100644 index 00000000..3abf4ba5 --- /dev/null +++ b/emu-configs/defaults/retrodeck/presets/primehack_presets.cfg @@ -0,0 +1,4 @@ +config_file_format^primehack +target_file^$primehackconf +defaults_file^$emuconfigs/primehack/Dolphin.ini +change^ask_to_exit^ConfirmStop^True^Interface diff --git a/emu-configs/defaults/retrodeck/presets/yuzu_presets.cfg b/emu-configs/defaults/retrodeck/presets/yuzu_presets.cfg index 063a9b00..e6c915fc 100644 --- a/emu-configs/defaults/retrodeck/presets/yuzu_presets.cfg +++ b/emu-configs/defaults/retrodeck/presets/yuzu_presets.cfg @@ -1,6 +1,8 @@ config_file_format^yuzu target_file^$yuzuconf defaults_file^$emuconfigs/yuzu/qt-config.ini +change^ask_to_exit^confirmClose^true^UI +change^ask_to_exit^confirmClose\default^true^UI change^nintendo_button_layout^player_0_button_a^pad:0,button:0,port:0,guid:03000000de280000ff11000001000000,engine:sdl^Controls change^nintendo_button_layout^player_0_button_b^pad:0,button:1,port:0,guid:03000000de280000ff11000001000000,engine:sdl^Controls change^nintendo_button_layout^player_0_button_x^pad:0,button:2,port:0,guid:03000000de280000ff11000001000000,engine:sdl^Controls diff --git a/emu-configs/defaults/retrodeck/reference_lists/pretty_system_names.cfg b/emu-configs/defaults/retrodeck/reference_lists/pretty_system_names.cfg index fb26b52c..94bf763a 100644 --- a/emu-configs/defaults/retrodeck/reference_lists/pretty_system_names.cfg +++ b/emu-configs/defaults/retrodeck/reference_lists/pretty_system_names.cfg @@ -1,13 +1,16 @@ -citra^Citra (Nintendo 3DS Standalone) -duckstation^Duckstation (Sony Playstation Standalone) +citra^Citra (Nintendo 3DS Standalone Emulator) +dolphin^Dolphin (GameCube / Wii Standalone Emulator) +duckstation^Duckstation (Sony Playstation Standalone Emulator) gb^Nintendo GameBoy gba^Nintendo GameBoy Advance gbc^Nintendo GameBoy Color genesis^Sega Genesis/Master System gg^Sega GameGear n64^Nintendo 64 -pcsx2^PCSX2 (Sony Playstation 2 Standalone) +pcsx2^PCSX2 (Sony Playstation 2 Standalone Emulator) +ppsspp^PPSSPP (Sony PSP Standalone Emulator) +primehack^Primehack (Metroid Prime Standalone Emulator) psx_ra^Sony Playstation (RetroArch Core) retroarch^RetroArch (Multi-emulator Frontend) snes^Nintendo Super Nintendo -yuzu^Yuzu (Nintendo Switch Standalone) +yuzu^Yuzu (Nintendo Switch Standalone Emulator) diff --git a/emu-configs/defaults/retrodeck/retrodeck.cfg b/emu-configs/defaults/retrodeck/retrodeck.cfg index a3ccf9a7..b821b596 100644 --- a/emu-configs/defaults/retrodeck/retrodeck.cfg +++ b/emu-configs/defaults/retrodeck/retrodeck.cfg @@ -64,9 +64,18 @@ snes=false yuzu=false [savestate_auto_load] +ppsspp=true retroarch=true [savestate_auto_save] duckstation=true pcsx2=true retroarch=true + +[ask_to_exit] +citra=false +dolphin=false +duckstation=false +pcsx2=false +primehack=false +yuzu=false diff --git a/emu-configs/dolphin/Dolphin.ini b/emu-configs/dolphin/Dolphin.ini index dddeea88..07a56ad8 100644 --- a/emu-configs/dolphin/Dolphin.ini +++ b/emu-configs/dolphin/Dolphin.ini @@ -51,10 +51,10 @@ DSPThread = True Backend = Pulse EnableJIT = False [Interface] -ConfirmStop = True +ConfirmStop = False CursorVisibility = 0 OnScreenDisplayMessages = True PauseOnFocusLost = True ShowActiveTitle = True UseBuiltinTitleDatabase = True -UsePanicHandlers = True \ No newline at end of file +UsePanicHandlers = True diff --git a/emu-configs/duckstation/settings.ini b/emu-configs/duckstation/settings.ini index 75136809..88f5c7c0 100644 --- a/emu-configs/duckstation/settings.ini +++ b/emu-configs/duckstation/settings.ini @@ -11,7 +11,7 @@ StartFullscreen = false PauseOnFocusLoss = true PauseOnMenu = true SaveStateOnExit = false -ConfirmPowerOff = true +ConfirmPowerOff = false LoadDevicesFromSaveStates = true ApplyGameSettings = true AutoLoadCheats = true diff --git a/emu-configs/ppssppsdl/ppsspp.ini b/emu-configs/ppssppsdl/ppsspp.ini index c2228f5a..66fa6b67 100644 --- a/emu-configs/ppssppsdl/ppsspp.ini +++ b/emu-configs/ppssppsdl/ppsspp.ini @@ -12,7 +12,7 @@ Language = en_US ForceLagSync2 = False DiscordPresence = True UISound = False -AutoLoadSaveState = 2 +AutoLoadSaveState = 0 EnableCheats = False CwCheatRefreshRate = 77 CwCheatScrollPosition = 0.000000 @@ -515,4 +515,4 @@ VRRescaleHUD = True VRCameraPitch = 0 VRHeadRotationScale = 5.000000 VRHeadRotationEnabled = False -VRHeadRotationSmoothing = False \ No newline at end of file +VRHeadRotationSmoothing = False diff --git a/emu-configs/primehack/Dolphin.ini b/emu-configs/primehack/Dolphin.ini index 89663dd0..d2e83c39 100644 --- a/emu-configs/primehack/Dolphin.ini +++ b/emu-configs/primehack/Dolphin.ini @@ -48,7 +48,7 @@ DisableScreenSaver = True KeepWindowOnTop = False Fullscreen = True [Interface] -ConfirmStop = True +ConfirmStop = False LanguageCode = OnScreenDisplayMessages = True PauseOnFocusLost = False diff --git a/functions/global.sh b/functions/global.sh index 1bb7740b..32d78f68 100644 --- a/functions/global.sh +++ b/functions/global.sh @@ -52,7 +52,6 @@ pretty_system_names_reference_list="$emuconfigs/defaults/retrodeck/reference_lis citraconf="/var/config/citra-emu/qt-config.ini" duckstationconf="/var/config/duckstation/settings.ini" melondsconf="/var/config/melonDS/melonDS.ini" -ppssppconf="/var/config/ppsspp/PSP/SYSTEM/ppsspp.ini" ryujinxconf="/var/config/Ryujinx/Config.json" xemuconf="/var/config/xemu/xemu.toml" yuzuconf="/var/config/yuzu/qt-config.ini" @@ -86,6 +85,11 @@ pcsx2gsconf="/var/config/PCSX2/inis/GS.ini" # This file should be deprecated sin pcsx2uiconf="/var/config/PCSX2/inis/PCSX2_ui.ini" # This file should be deprecated since moving to PCSX2-QT pcsx2vmconf="/var/config/PCSX2/inis/PCSX2_vm.ini" # This file should be deprecated since moving to PCSX2-QT +# PPSSPPDL config files + +ppssppconf="/var/config/ppsspp/PSP/SYSTEM/ppsspp.ini" +ppssppcontrolsconf="/var/config/ppsspp/PSP/SYSTEM/controls.ini" + # Primehack config files primehackconf="/var/config/primehack/Dolphin.ini" diff --git a/functions/post_update.sh b/functions/post_update.sh index 5ce89e92..493196d7 100644 --- a/functions/post_update.sh +++ b/functions/post_update.sh @@ -82,7 +82,9 @@ post_update() { # - Move Dolphin and Primehack save folder names # - Move PPSSPP saves/states to appropriate folders # - Set ESDE user themes folder directly - # - Disable auto-save/load in RA / PCSX2 / Duckstation for proper preset functionality + # - Disable auto-save/load in existing RA / PCSX2 / Duckstation installs for proper preset functionality + # - Disable ask-on-exit in existing Citra / Dolphin / Duckstation / Primehack installs for proper preset functionality + # - Disable auto-load-state in existing PPSSPP installs for proper preset functionality # - Init Cemu as it is a new emulator update_rd_conf # Expand retrodeck.cfg to latest template @@ -200,6 +202,14 @@ post_update() { set_setting_value "$duckstationconf" "SaveStateOnExit" "false" "duckstation" "Main" set_setting_value "$duckstationconf" "Enabled" "false" "duckstation" "Cheevos" + set_setting_value "$citraconf" "confirmClose" "false" "citra" "UI" + set_setting_value "$citraconf" "confirmClose\default" "false" "citra" "UI" + set_setting_value "$dolphinconf" "ConfirmStop" "False" "dolphin" "Interface" + set_setting_value "$duckstationconf" "ConfirmPowerOff" "false" "duckstation" "Main" + set_setting_value "$primehackconf" "ConfirmStop" "False" "primehack" "Interface" + + set_setting_value "$ppssppconf" "AutoLoadSaveState" "0" "ppsspp" "General" + prepare_emulator "reset" "cemu" fi diff --git a/tools/configurator.sh b/tools/configurator.sh index 4d21f8a5..91c08fd3 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -11,7 +11,8 @@ source /app/libexec/global.sh # Welcome # - Presets & Settings # - Global: Presets & Settings -# - Enable/Disable widescreen +# - Enable/Disable Widescreen +# - Enable/Disable Ask-To-Exit # - RetroAchievements Login # - RetroAchievements Logout # - Enable/Disable RetroAchievements Hardcore Mode @@ -179,6 +180,7 @@ configurator_global_presets_and_settings_dialog() { --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \ --column="Choice" --column="Action" \ "Enable/Disable Widescreen" "Enable or disable widescreen in supported systems" \ + "Enable/Disable Ask-to-Exit" "Enable or disable emulators confirming when quitting in supported systems" \ "RetroAchievements Login" "Log into the RetroAchievements service in supported systems" \ "RetroAchievements Logout" "Disable RetroAchievements service in ALL supported systems" \ "RetroAchievements Hardcore Mode" "Enable RetroAchievements hardcore mode (no cheats, rewind, save states etc.) in supported emulators" \ @@ -191,6 +193,11 @@ configurator_global_presets_and_settings_dialog() { configurator_global_presets_and_settings_dialog ;; + "Enable/Disable Ask-to-Exit" ) + change_preset_dialog "ask_to_exit" + configurator_global_presets_and_settings_dialog + ;; + "RetroAchievements Login" ) local cheevos_creds=$(get_cheevos_token_dialog) if [[ ! "$cheevos_creds" == "failed" ]]; then