mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-02-21 09:39:49 +00:00
feat: add firstboot warning to users with polaris gpus (#1277)
Only triggers if `/usr/libexec/bazzite-sdl-gpu-warn` exists (only does on handheld images) also triggers on any gpus defined in `/usr/libexec/gamescope-sdl-workaround`
This commit is contained in:
parent
c70ccbd174
commit
7848f42799
38
system_files/deck/shared/usr/libexec/bazzite-sdl-gpu-warn
Executable file
38
system_files/deck/shared/usr/libexec/bazzite-sdl-gpu-warn
Executable file
@ -0,0 +1,38 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# The file to use for tracking if the warning has been shown
|
||||
ACCEPTED="$HOME/.config/bazzite/gamescope-sdl-accepted"
|
||||
|
||||
# Check if the check has already run
|
||||
if [ -f "$ACCEPTED" ]; then
|
||||
# Exit if user has already aknowledged the warning
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Show the SDL workaround warning if required
|
||||
if /usr/libexec/gamescope-sdl-workaround; then
|
||||
# Add 4 spaces if you want to start a new line,
|
||||
# it makes the text easier to read in the dialog.
|
||||
zenity --text-info --title="WARNING: Problematic GPU detected!" --checkbox="Understood, I made sure to have a controller connected." --width 560 --height 430 <<< "
|
||||
This GPU requires a workaround to work in Game Mode Session!
|
||||
It is applied automatically, however it means that
|
||||
keyboard and mouse will not work AT ALL when using
|
||||
Game Mode Session (Desktop Mode will not be affected)
|
||||
|
||||
Please pair at least 1 bluetooth controller to the system now
|
||||
so you can navigate Steam Game Mode.
|
||||
|
||||
If you plan to use a wired controller or one with a non
|
||||
bluetooth dongle, verify it is detected in Steam BEFORE rebooting!"
|
||||
|
||||
# If the user mark the checkbox and clicks OK
|
||||
# shellcheck disable=SC2181
|
||||
if [ "$?" == "0" ]; then
|
||||
# Make the .config/bazzite folder if needed
|
||||
if [ ! -d "$HOME/.config/bazzite" ]; then
|
||||
mkdir "$HOME/.config/bazzite/"
|
||||
fi
|
||||
# Mark that the user has acknowledged the warning
|
||||
touch "$ACCEPTED"
|
||||
fi
|
||||
fi
|
@ -1,4 +1,11 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Show a warning to people that need gamescope-sdl-workaround
|
||||
# Only runs if the script file from the deck image exists
|
||||
if [ -f "/usr/libexec/bazzite-sdl-gpu-warn" ]; then
|
||||
# This will only show a warning if the user has not accepted the warning
|
||||
/usr/libexec/bazzite-sdl-gpu-warn &
|
||||
fi
|
||||
|
||||
# Simply launches the "yafti" GUI with the uBlue image's configuration.
|
||||
/usr/bin/yafti /usr/share/ublue-os/firstboot/yafti.yml
|
||||
|
Loading…
x
Reference in New Issue
Block a user