mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-25 15:35:38 +00:00
Add Nintendo Button Layout Configurator menu
Add login timestamp to cheevos login for Duckstation and PCSX2 Add processing dialog to reset all Change Duckstation config location to /var/config to match new location Add cheevos required sections to shipped PXSX2 and Duckstation configs Add cheevos hardcore mode presets for PCSX2 and Duckstation
This commit is contained in:
parent
95da78b8e2
commit
4a0bc26084
|
@ -447,3 +447,11 @@ PressureModifier = 0.500000
|
|||
|
||||
[GameList]
|
||||
RecursivePaths = RETRODECKHOMEDIR/roms/ps2
|
||||
|
||||
|
||||
[Achievements]
|
||||
Enabled = false
|
||||
ChallengeMode = false
|
||||
Username =
|
||||
Token =
|
||||
LoginTimestamp =
|
||||
|
|
|
@ -4,3 +4,5 @@ defaults_file^$emuconfigs/duckstation/settings.ini
|
|||
change^cheevos^Enabled^true^Cheevos
|
||||
change^cheevos^Username^$cheevos_username^Cheevos
|
||||
change^cheevos^Token^$cheevos_token^Cheevos
|
||||
change^cheevos^LoginTimestamp^$cheevos_login_timestamp
|
||||
change^cheevos_hardcore^ChallengeMode^true
|
||||
|
|
|
@ -4,3 +4,5 @@ defaults_file^$emuconfigs/PCSX2/PCSX2.ini
|
|||
change^cheevos^Enabled^true^Achievements
|
||||
change^cheevos^Username^$cheevos_username^Achievements
|
||||
change^cheevos^Token^$cheevos_token^Achievements
|
||||
change^cheevos^LoginTimestamp^$cheevos_login_timestamp
|
||||
change^cheevos_hardcore^ChallengeMode^true
|
||||
|
|
|
@ -34,6 +34,8 @@ PCSX2=false
|
|||
RetroArch=false
|
||||
|
||||
[cheevos_hardcore]
|
||||
Duckstation=false
|
||||
PCSX2=false
|
||||
RetroArch=false
|
||||
|
||||
[borders]
|
||||
|
|
|
@ -244,10 +244,19 @@ UndoLoadState = Keyboard/Control+9
|
|||
|
||||
|
||||
[Cheevos]
|
||||
Enabled = true
|
||||
Enabled = false
|
||||
TestMode = false
|
||||
UnofficialTestMode = false
|
||||
UseFirstDiscFromPlaylist = true
|
||||
RichPresence = true
|
||||
ChallengeMode = false
|
||||
Leaderboards = true
|
||||
Notifications = true
|
||||
SoundEffects = true
|
||||
PrimedIndicators = true
|
||||
Username =
|
||||
Token =
|
||||
LoginTimestamp =
|
||||
|
||||
|
||||
[UI]
|
||||
|
|
|
@ -190,8 +190,9 @@ get_cheevos_token_dialog() {
|
|||
local cheevos_response=$(curl --silent --data "r=login&u=$cheevos_username&p=$cheevos_password" $RA_API_URL)
|
||||
local cheevos_success=$(echo $cheevos_response | jq .Success | tr -d '"')
|
||||
local cheevos_token=$(echo $cheevos_response | jq .Token | tr -d '"')
|
||||
local cheevos_login_timestamp=$(date +%s)
|
||||
if [[ "$cheevos_success" == "true" ]]; then
|
||||
echo "$cheevos_username,$cheevos_token"
|
||||
echo "$cheevos_username,$cheevos_token,$cheevos_login_timestamp"
|
||||
else
|
||||
echo "failed"
|
||||
fi
|
||||
|
|
|
@ -50,7 +50,7 @@ incompatible_presets_reference_list="$emuconfigs/defaults/retrodeck/reference_li
|
|||
|
||||
cemuconf="/var/config/Cemu/settings.xml"
|
||||
citraconf="/var/config/citra-emu/qt-config.ini"
|
||||
duckstationconf="/var/data/duckstation/settings.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"
|
||||
|
|
|
@ -95,9 +95,9 @@ post_update() {
|
|||
deploy_single_patch "$emuconfigs/PCSX2/PCSX2.ini" "/var/config/PCSX2/inis/PCSX2-cheevos-upgrade.patch" "$pcsx2qtconf"
|
||||
rm -f "/var/config/PCSX2/inis/PCSX2-cheevos-upgrade.patch"
|
||||
mv -f "$duckstationconf" "$duckstationconf.bak"
|
||||
generate_single_patch "$emuconfigs/duckstation/settings.ini" "$duckstationconf.bak" "/var/data/duckstation/duckstation-cheevos-upgrade.patch" pcsx2
|
||||
deploy_single_patch "$emuconfigs/duckstation/settings.ini" "/var/data/duckstation/duckstation-cheevos-upgrade.patch" "$duckstationconf"
|
||||
rm -f "/var/data/duckstation/duckstation-cheevos-upgrade.patch"
|
||||
generate_single_patch "$emuconfigs/duckstation/settings.ini" "$duckstationconf.bak" "/var/config/duckstation/duckstation-cheevos-upgrade.patch" pcsx2
|
||||
deploy_single_patch "$emuconfigs/duckstation/settings.ini" "/var/config/duckstation/duckstation-cheevos-upgrade.patch" "$duckstationconf"
|
||||
rm -f "/var/config/duckstation/duckstation-cheevos-upgrade.patch"
|
||||
|
||||
mkdir -p "$mods_folder"
|
||||
mkdir -p "$texture_packs_folder"
|
||||
|
@ -155,7 +155,7 @@ post_update() {
|
|||
mkdir -p "$states_folder/psx"
|
||||
mv -t "$states_folder/psx/" "$states_folder/duckstation"
|
||||
unlink "/var/data/duckstation/savestates"
|
||||
dir_prep "$states_folder/psx/duckstation" "/var/data/duckstation/savestates"
|
||||
dir_prep "$states_folder/psx/duckstation" "/var/config/duckstation/savestates"
|
||||
|
||||
rm -rf /var/config/retrodeck/tools
|
||||
rm -rf /var/config/emulationstation/.emulationstation/gamelists/tools/
|
||||
|
|
|
@ -261,22 +261,22 @@ prepare_emulator() {
|
|||
dir_prep "$multi_user_data_folder/$SteamAppUser/config/duckstation" "/var/config/duckstation"
|
||||
else # Single-user actions
|
||||
rm -rf /var/config/duckstation
|
||||
mkdir -p /var/data/duckstation/
|
||||
cp -fv "$emuconfigs/duckstation/"* /var/data/duckstation
|
||||
mkdir -p /var/config/duckstation/
|
||||
cp -fv "$emuconfigs/duckstation/"* /var/config/duckstation
|
||||
set_setting_value "$duckstationconf" "SearchDirectory" "$bios_folder" "duckstation" "BIOS"
|
||||
set_setting_value "$duckstationconf" "Card1Path" "$saves_folder/psx/duckstation/memcards/shared_card_1.mcd" "duckstation" "MemoryCards"
|
||||
set_setting_value "$duckstationconf" "Card2Path" "$saves_folder/psx/duckstation/memcards/shared_card_2.mcd" "duckstation" "MemoryCards"
|
||||
set_setting_value "$duckstationconf" "Directory" "$saves_folder/psx/duckstation/memcards" "duckstation" "MemoryCards"
|
||||
fi
|
||||
dir_prep "$saves_folder/psx/duckstation/memcards" "/var/data/duckstation/memcards" # TODO: This shouldn't be needed anymore, verify
|
||||
dir_prep "$states_folder/psx/duckstation" "/var/data/duckstation/savestates" # This is hard-coded in Duckstation, always needed
|
||||
dir_prep "$saves_folder/psx/duckstation/memcards" "/var/config/duckstation/memcards" # TODO: This shouldn't be needed anymore, verify
|
||||
dir_prep "$states_folder/psx/duckstation" "/var/config/duckstation/savestates" # This is hard-coded in Duckstation, always needed
|
||||
fi
|
||||
if [[ "$action" == "postmove" ]]; then # Run only post-move commands
|
||||
set_setting_value "$duckstationconf" "SearchDirectory" "$bios_folder" "duckstation" "BIOS"
|
||||
set_setting_value "$duckstationconf" "Card1Path" "$saves_folder/psx/duckstation/memcards/shared_card_1.mcd" "duckstation" "MemoryCards"
|
||||
set_setting_value "$duckstationconf" "Card2Path" "$saves_folder/psx/duckstation/memcards/shared_card_2.mcd" "duckstation" "MemoryCards"
|
||||
set_setting_value "$duckstationconf" "Directory" "$saves_folder/psx/duckstation/memcards" "duckstation" "MemoryCards"
|
||||
dir_prep "$states_folder/psx/duckstation" "/var/data/duckstation/savestates" # This is hard-coded in Duckstation, always needed
|
||||
dir_prep "$states_folder/psx/duckstation" "/var/config/duckstation/savestates" # This is hard-coded in Duckstation, always needed
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -183,7 +183,8 @@ configurator_global_presets_and_settings_dialog() {
|
|||
"Enable/Disable Borders" "Enable or disable borders in supported systems" \
|
||||
"Enable/Disable Widescreen" "Enable or disable widescreen in supported systems" \
|
||||
"RetroAchievements Login" "Log into the RetroAchievements service in supported systems" \
|
||||
"RetroAchievements Hardcore Mode" "Enable RetroAchievements hardcore mode (no cheats, rewind, save states etc.) in supported emulators" )
|
||||
"RetroAchievements Hardcore Mode" "Enable RetroAchievements hardcore mode (no cheats, rewind, save states etc.) in supported emulators" \
|
||||
"Nintendo Button Layout" "Enable or disable Nintendo button layout (swapped A/B and X/Y) in supported systems" )
|
||||
|
||||
case $choice in
|
||||
|
||||
|
@ -201,7 +202,7 @@ configurator_global_presets_and_settings_dialog() {
|
|||
local cheevos_creds=$(get_cheevos_token_dialog)
|
||||
if [[ ! "$cheevos_creds" == "failed" ]]; then
|
||||
configurator_generic_dialog "RetroDECK Configurator Utility - RetroAchievements" "RetroAchievements login successful, please select systems you would like to enable achievements for in the next dialog."
|
||||
IFS=',' read -r cheevos_username cheevos_token < <(printf '%s\n' "$cheevos_creds")
|
||||
IFS=',' read -r cheevos_username cheevos_token cheevos_login_timestamp < <(printf '%s\n' "$cheevos_creds")
|
||||
change_preset_dialog "cheevos"
|
||||
else
|
||||
configurator_generic_dialog "RetroDECK Configurator Utility - RetroAchievements" "RetroAchievements login failed, please verify your username and password and try the process again."
|
||||
|
@ -214,6 +215,11 @@ configurator_global_presets_and_settings_dialog() {
|
|||
configurator_global_presets_and_settings_dialog
|
||||
;;
|
||||
|
||||
"Nintendo Button Layout" )
|
||||
change_preset_dialog "nintendo_button_layout"
|
||||
configurator_global_presets_and_settings_dialog
|
||||
;;
|
||||
|
||||
"" ) # No selection made or Back button clicked
|
||||
configurator_presets_and_settings_dialog
|
||||
;;
|
||||
|
@ -968,7 +974,13 @@ configurator_reset_dialog() {
|
|||
"Reset All Emulators" )
|
||||
if [[ $(configurator_reset_confirmation_dialog "all emulators" "Are you sure you want to reset all emulators to default settings?\n\nThis process cannot be undone.") == "true" ]]; then
|
||||
if [[ $(check_network_connectivity) == "true" ]]; then
|
||||
(
|
||||
prepare_emulator "reset" "all"
|
||||
) |
|
||||
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||
--title "RetroDECK Finishing Initialization" \
|
||||
--text="RetroDECK is finishing the reset process, please wait."
|
||||
configurator_process_complete_dialog "resetting all emulators"
|
||||
else
|
||||
configurator_generic_dialog "RetroDeck Configurator - RetroDECK: Reset" "You do not appear to be connected to a network with internet access.\n\nThe all-emulator reset process requires some files from the internet to function properly.\n\nPlease retry this process once a network connection is available."
|
||||
|
|
Loading…
Reference in a new issue