Warn of issues when running in desktop mode

This commit is contained in:
icenine451 2023-03-07 12:00:32 -05:00
parent f95c3d7b56
commit c5dd024acc
2 changed files with 16 additions and 0 deletions

View file

@ -159,6 +159,16 @@ local file=$1
fi 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() { set_setting_value() {
# Function for editing settings # Function for editing settings
# USAGE: set_setting_value $setting_file "$setting_name" "$new_setting_value" $system $section_name(optional) # USAGE: set_setting_value $setting_file "$setting_name" "$new_setting_value" $system $section_name(optional)

View file

@ -125,6 +125,12 @@ else
finit # Executing First/Force init finit # Executing First/Force init
fi fi
# Check if running in Desktop mode and warn if true
if [[ $XDG_CURRENT_DESKTOP == "KDE" ]]; then
desktop_mode_warning
fi
# Normal Startup # Normal Startup
start_retrodeck start_retrodeck