Update controller profile

Add GitHub API reachability check to online version check
This commit is contained in:
icenine451 2023-06-02 09:38:31 -04:00
parent 2badb902dc
commit 1bc98a1713
2 changed files with 66 additions and 84 deletions

View file

@ -1,18 +1,18 @@
"controller_mappings" "controller_mappings"
{ {
"version" "3" "version" "3"
"revision" "1556" "revision" "1581"
"title" "RetroDECK: Official Layout - v.0.7b" "title" "RetroDECK: Official Layout - v0.7b"
"description" "The Official RetroDECK Layout" "description" "The Official RetroDECK Layout""
"creator" "" "creator" ""
"progenitor" "" "progenitor" ""
"url" "autosave:///home/deck/.local/share/Steam/steamapps/common/Steam Controller Configs/25233020/config/retrodeck/controller_neptune.vdf" "url" ""
"export_type" "template" "export_type" "personal_cloud"
"controller_type" "controller_neptune" "controller_type" "controller_neptune"
"controller_caps" "23117823" "controller_caps" "23117823"
"major_revision" "0" "major_revision" "0"
"minor_revision" "0" "minor_revision" "0"
"Timestamp" "-999421760" "Timestamp" "-1230584288"
"actions" "actions"
{ {
"Default" "Default"
@ -708,14 +708,6 @@
"binding" "key_press RETURN, FULLSCREEN TOGGLE, , " "binding" "key_press RETURN, FULLSCREEN TOGGLE, , "
} }
} }
"Full_Press"
{
"bindings"
{
"binding" "key_press LEFT_ALT, , "
"binding" "key_press RETURN, , "
}
}
} }
"disabled_activators" "disabled_activators"
{ {
@ -1561,14 +1553,6 @@
"binding" "key_press RETURN, Fullscreen On/Off, RD-zoom-fit-best.png, #232323 #FFFFFF" "binding" "key_press RETURN, Fullscreen On/Off, RD-zoom-fit-best.png, #232323 #FFFFFF"
} }
} }
"Full_Press"
{
"bindings"
{
"binding" "key_press LEFT_ALT, , "
"binding" "key_press RETURN, , "
}
}
} }
"disabled_activators" "disabled_activators"
{ {
@ -2748,14 +2732,6 @@
"binding" "key_press RETURN, Fullscreen On/Off, RD-zoom-fit-best.png, " "binding" "key_press RETURN, Fullscreen On/Off, RD-zoom-fit-best.png, "
} }
} }
"Full_Press"
{
"bindings"
{
"binding" "key_press LEFT_ALT, , "
"binding" "key_press RETURN, , "
}
}
} }
"disabled_activators" "disabled_activators"
{ {
@ -2803,8 +2779,8 @@
{ {
"bindings" "bindings"
{ {
"binding" "key_press LEFT_ALT, Change Dual-Screenlayout, RD-preferences-system-windows-actions.png, " "binding" "key_press LEFT_CONTROL, Change Dual-Screenlayout, RD-preferences-system-windows-actions.png, "
"binding" "key_press 0, Change Dual-Screenlayout, RD-preferences-system-windows-actions.png, " "binding" "key_press L, Change Dual-Screenlayout, RD-preferences-system-windows-actions.png, "
} }
} }
} }
@ -3183,8 +3159,8 @@
{ {
"bindings" "bindings"
{ {
"binding" "key_press LEFT_CONTROL, Open Menu, RD-preferences-desktop-icons.png, " "binding" "key_press LEFT_CONTROL, Exit / Quit Emulator, RD-process-stop.png, "
"binding" "key_press M, Open Menu, RD-preferences-desktop-icons.png, " "binding" "key_press ESCAPE, Exit / Quit Emulator, RD-process-stop.png, "
} }
} }
} }
@ -3200,8 +3176,8 @@
{ {
"bindings" "bindings"
{ {
"binding" "key_press LEFT_CONTROL, Exit / Quit Emulator, RD-process-stop.png, " "binding" "key_press LEFT_CONTROL, Open Menu, RD-preferences-desktop-icons.png, "
"binding" "key_press ESCAPE, Exit / Quit Emulator, RD-process-stop.png, " "binding" "key_press M, Open Menu, RD-preferences-desktop-icons.png, "
} }
} }
} }
@ -3748,7 +3724,7 @@
"bindings" "bindings"
{ {
"binding" "key_press LEFT_ALT, ALT + F4, RD-F4.png, " "binding" "key_press LEFT_ALT, ALT + F4, RD-F4.png, "
"binding" "controller_action empty_sub_command, ALT + F4, RD-F4.png, " "binding" "key_press F4, ALT + F4, RD-F4.png, "
} }
} }
} }

View file

@ -27,6 +27,9 @@ check_desktop_mode() {
check_for_version_update() { check_for_version_update() {
# This function will perform a basic online version check and alert the user if there is a new version available. # This function will perform a basic online version check and alert the user if there is a new version available.
wget -q --spider "https://api.github.com/repos/XargonWan/$update_repo/releases/latest"
if [ $? -eq 0 ]; then
local online_version=$(curl --silent "https://api.github.com/repos/XargonWan/$update_repo/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') local online_version=$(curl --silent "https://api.github.com/repos/XargonWan/$update_repo/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
if [[ ! "$update_ignore" == "$online_version" ]]; then if [[ ! "$update_ignore" == "$online_version" ]]; then
@ -80,6 +83,9 @@ check_for_version_update() {
fi fi
fi fi
fi fi
else # Unable to reach the GitHub API for some reason
configurator_generic_dialog "RetroDECK Online Update" "RetroDECK is unable to reach the GitHub API to perform a version check.\nIt's possible that location is being blocked by your network or ISP.\n\nIf the problem continues, you will need to disable internal checks through the Configurator\nand perform updates manually through the Discover store."
fi
} }
validate_input() { validate_input() {