From 41d9f2199246b4f61d7ea4570b2501463c5e3150 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Mon, 5 Sep 2022 17:11:54 +0200 Subject: [PATCH] Added rewind tool (missing racfg location) --- es-configs/tools-gamelist.xml | 7 +++++++ tools/rewind.sh | 23 +++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100755 tools/rewind.sh diff --git a/es-configs/tools-gamelist.xml b/es-configs/tools-gamelist.xml index e59195be..b171f16a 100644 --- a/es-configs/tools-gamelist.xml +++ b/es-configs/tools-gamelist.xml @@ -98,4 +98,11 @@ true true + + ./rewind.sh + Rewind toggler + Enable or disable the rewind function for some RetroArch cores. + true + true + \ No newline at end of file diff --git a/tools/rewind.sh b/tools/rewind.sh new file mode 100755 index 00000000..abc79a22 --- /dev/null +++ b/tools/rewind.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +racfg="" + +zenity --question \ +--no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ +--title "RetroDECK" \ +--text="Do you want to enable the rewind function in RetroArch cores?\n\nNOTE:\nThis may impact on performances expecially on the latest systems." + +if [ $? == 0 ] #yes, enable +then + sed -i 's%rewind_enable = .*%rewind_enable = "true"' $racfg + zenity --info \ + --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ + --title "RetroDECK" \ + --text="Rewind enabled\!\nYou can check on Libretro docs to see which cores supports this function." +else # no, disable + sed -i 's%rewind_enable = .*%rewind_enable = "false"' $racfg + zenity --info \ + --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ + --title "RetroDECK" \ + --text="Rewind disabled." +fi