From 4a996e9c6b56ddfa2051fd6b2f1e03722280bf0e Mon Sep 17 00:00:00 2001 From: icenine451 Date: Mon, 4 Mar 2024 09:07:39 -0500 Subject: [PATCH 1/4] Fix desktop mode warning dialog logging --- functions/dialogs.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions/dialogs.sh b/functions/dialogs.sh index 1441cc4f..c0789042 100644 --- a/functions/dialogs.sh +++ b/functions/dialogs.sh @@ -222,7 +222,6 @@ desktop_mode_warning() { --text="$message") rc=$? # Capture return code, as "Yes" button has no text value if [[ $rc == "1" ]]; then # If any button other than "Yes" was clicked - log i "Selected: \"Yes\"" if [[ $choice == "No" ]]; then log i "Selected: \"No\"" exit 1 @@ -230,6 +229,8 @@ desktop_mode_warning() { log i "Selected: \"Never show this again\"" set_setting_value $rd_conf "desktop_mode_warning" "false" retrodeck "options" # Store desktop mode warning variable for future checks fi + else + log i "Selected: \"Yes\"" fi fi } From 013892d203695ece40c4cccddae2d6f98420d481 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Sat, 9 Mar 2024 13:17:39 -0500 Subject: [PATCH 2/4] Add real Deck check function --- functions/checks.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/functions/checks.sh b/functions/checks.sh index 4a2961d1..5934d265 100644 --- a/functions/checks.sh +++ b/functions/checks.sh @@ -28,6 +28,17 @@ check_desktop_mode() { fi } +check_is_steam_deck() { + # This function will check the internal product ID for the Steam Deck codename and return "true" if RetroDECK is running on a real Deck + # USAGE: if [[ $(check_is_steam_deck) == "true" ]]; then + + if [[ $(cat /sys/devices/virtual/dmi/id/product_name) == "Jupiter" ]]; then + echo "true" + else + echo "false" + fi +} + check_for_version_update() { # This function will perform a basic online version check and alert the user if there is a new version available. From 6bbf33a7c806b1d1e6757a8251e7202d7a0bc91a Mon Sep 17 00:00:00 2001 From: icenine451 Date: Mon, 11 Mar 2024 08:41:25 -0400 Subject: [PATCH 3/4] Update Deck check to include Deck OLED --- functions/checks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/checks.sh b/functions/checks.sh index 5934d265..c8e91a2a 100644 --- a/functions/checks.sh +++ b/functions/checks.sh @@ -32,7 +32,7 @@ check_is_steam_deck() { # This function will check the internal product ID for the Steam Deck codename and return "true" if RetroDECK is running on a real Deck # USAGE: if [[ $(check_is_steam_deck) == "true" ]]; then - if [[ $(cat /sys/devices/virtual/dmi/id/product_name) == "Jupiter" ]]; then + if [[ $(cat /sys/devices/virtual/dmi/id/product_name) =~ ^(Jupiter|Galileo)$ ]]; then echo "true" else echo "false" From 45bb5ac43bb1b6aad6e0b553d7f968a303eb9522 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Tue, 12 Mar 2024 10:13:41 -0400 Subject: [PATCH 4/4] Only check for Desktop Mode on Steam Deck platform --- retrodeck.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/retrodeck.sh b/retrodeck.sh index b4ec2f19..834ee224 100644 --- a/retrodeck.sh +++ b/retrodeck.sh @@ -166,8 +166,9 @@ if [[ $multi_user_mode == "true" ]]; then fi # Run optional startup checks - -desktop_mode_warning +if [[ $(check_is_steam_deck) == "true" ]]; then # Only warn about Desktop Mode on Steam Deck, ignore for other platforms + desktop_mode_warning +fi low_space_warning # Check if there is a new version of RetroDECK available, if update_check=true in retrodeck.cfg and there is network connectivity available.