From c5dd024acc38781a5f7ddbe9003dd9b8dcc562c1 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Tue, 7 Mar 2023 12:00:32 -0500 Subject: [PATCH] Warn of issues when running in desktop mode --- functions.sh | 10 ++++++++++ retrodeck.sh | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/functions.sh b/functions.sh index 031cad50..ec628835 100644 --- a/functions.sh +++ b/functions.sh @@ -159,6 +159,16 @@ local file=$1 fi } +desktop_mode_warning() { + # This function is a generic warning for issues that happen when running in desktop mode. + # Running in desktop mode can be verified with the following command: if [[ $XDG_CURRENT_DESKTOP == "KDE" ]]; then + + zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap \ + --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ + --title "RetroDECK Desktop Mode Warning" \ + --text="You appear to be running RetroDECK in the Steam Deck's Desktop mode!\n\nSome functions of RetroDECK may not work properly in Desktop mode, such as the Steam Decks normal controls.\n\nRetroDECK is best enjoyed in Game mode!" +} + set_setting_value() { # Function for editing settings # USAGE: set_setting_value $setting_file "$setting_name" "$new_setting_value" $system $section_name(optional) diff --git a/retrodeck.sh b/retrodeck.sh index 3154acfe..432da629 100644 --- a/retrodeck.sh +++ b/retrodeck.sh @@ -125,6 +125,12 @@ else finit # Executing First/Force init fi +# Check if running in Desktop mode and warn if true + +if [[ $XDG_CURRENT_DESKTOP == "KDE" ]]; then + desktop_mode_warning +fi + # Normal Startup start_retrodeck \ No newline at end of file