From 78bfa1e5aa54dca925b4e4f42a9a3ca69bb6c5bd Mon Sep 17 00:00:00 2001 From: icenine451 Date: Thu, 16 Mar 2023 11:14:25 -0400 Subject: [PATCH] - Fix PICO-8 symlink location - Seperate Dolphin/Primehack save states - Fix post-update variable checks for new values --- functions.sh | 8 ++++---- global.sh | 8 ++++++++ post_update.sh | 11 +++++++++++ retrodeck.sh | 2 ++ 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/functions.sh b/functions.sh index b17d2716..196d4fae 100644 --- a/functions.sh +++ b/functions.sh @@ -781,7 +781,7 @@ dolphin_init() { dir_prep "$rdhome/saves/gc/dolphin/USA" "/var/data/dolphin-emu/GC/USA" dir_prep "$rdhome/saves/gc/dolphin/JAP" "/var/data/dolphin-emu/GC/JAP" dir_prep "$rdhome/screenshots" "/var/data/dolphin-emu/ScreenShots" - dir_prep "$rdhome/states" "/var/data/dolphin-emu/StateSaves" + dir_prep "$rdhome/states/dolphin" "/var/data/dolphin-emu/StateSaves" mkdir -pv /var/data/dolphin-emu/Wii/ dir_prep "$rdhome/saves/wii/dolphin" "/var/data/dolphin-emu/Wii" } @@ -799,7 +799,7 @@ primehack_init() { dir_prep "$rdhome/saves/gc/primehack/USA" "/var/data/primehack/GC/USA" dir_prep "$rdhome/saves/gc/primehack/JAP" "/var/data/primehack/GC/JAP" dir_prep "$rdhome/screenshots" "/var/data/primehack/ScreenShots" - dir_prep "$rdhome/states" "/var/data/primehack/StateSaves" + dir_prep "$rdhome/states/primehack" "/var/data/primehack/StateSaves" mkdir -pv /var/data/primehack/Wii/ dir_prep "$rdhome/saves/wii/primehack" "/var/data/primehack/Wii" } @@ -1070,7 +1070,7 @@ emulators_post_move() { dir_prep "$rdhome/saves/gc/dolphin/USA" "/var/data/dolphin-emu/GC/USA" dir_prep "$rdhome/saves/gc/dolphin/JAP" "/var/data/dolphin-emu/GC/JAP" dir_prep "$rdhome/screenshots" "/var/data/dolphin-emu/ScreenShots" - dir_prep "$rdhome/states" "/var/data/dolphin-emu/StateSaves" + dir_prep "$rdhome/states/dolphin" "/var/data/dolphin-emu/StateSaves" dir_prep "$rdhome/saves/wii/dolphin" "/var/data/dolphin-emu/Wii/" # Primehack section @@ -1079,7 +1079,7 @@ emulators_post_move() { dir_prep "$rdhome/saves/gc/primehack/USA" "/var/data/primehack/GC/USA" dir_prep "$rdhome/saves/gc/primehack/JAP" "/var/data/primehack/GC/JAP" dir_prep "$rdhome/screenshots" "/var/data/primehack/ScreenShots" - dir_prep "$rdhome/states" "/var/data/primehack/StateSaves" + dir_prep "$rdhome/states/primehack" "/var/data/primehack/StateSaves" dir_prep "$rdhome/saves/wii/primehack" "/var/data/primehack/Wii/" # PCSX2 section diff --git a/global.sh b/global.sh index 7bfd48fa..f2566fa6 100755 --- a/global.sh +++ b/global.sh @@ -54,6 +54,14 @@ pcsx2vmconf="/var/config/PCSX2/inis/PCSX2_vm.ini" pcsx2qtconf="/var/config/PCSX2/inis/PCSX2.ini" +# Primehack config files + +primehackconf="/var/config/primehack/Dolphin.ini" +primehackgcpadconf="/var/config/primehack/GCPadNew.ini" +primehackgfxconf="/var/config/primehack/GFX.ini" +primehackhkconf="/var/config/primehack/Hotkeys.ini" +primehackqtconf="/var/config/primehack/Qt.ini" + # We moved the lockfile in /var/config/retrodeck in order to solve issue #53 - Remove in a few versions if [ -f "$HOME/retrodeck/.lock" ] then diff --git a/post_update.sh b/post_update.sh index cc469cec..4a87fbfa 100644 --- a/post_update.sh +++ b/post_update.sh @@ -199,6 +199,17 @@ post_update() { dir_prep "$roms_folder/pico8" "$bios_folder/pico-8/carts" # Symlink default game location to RD roms for cleanliness (this location is overridden anyway by the --root_path launch argument anyway) dir_prep "$bios_folder/pico-8/cdata" "$saves_folder/pico-8" # PICO-8 saves folder fi + if [[ $prev_version -le "063" ]]; then + # In version 0.6.2b, the following changes were made that required config file updates/reset: + # - Put Dolphin and Primehack save states in different folders inside $rd_home/states + # - Fix symlink to hard-coded PICO-8 config folder (dir_prep doesn't like ~) + + dir_prep "$rdhome/states/dolphin" "/var/data/dolphin-emu/StateSaves" + dir_prep "$rdhome/states/primehack" "/var/data/primehack/StateSaves" + + rm -rf "$HOME/~/" # Remove old incorrect location from 0.6.2b + dir_prep "$bios_folder/pico-8" "$HOME/.lexaloffle/pico-8" # Store binary and config files together. The .lexaloffle directory is a hard-coded location for the PICO-8 config file, cannot be changed + fi # The following commands are run every time. diff --git a/retrodeck.sh b/retrodeck.sh index 431ede18..862bc05c 100644 --- a/retrodeck.sh +++ b/retrodeck.sh @@ -118,6 +118,8 @@ else finit # Executing First/Force init fi +source $rd_conf # Load latest variable values + # Check if running in Desktop mode and warn if true, unless desktop_mode_warning=false in retrodeck.cfg desktop_mode_warning