From 7f9194828acc9b3d200be3a3357e2332f145d1c0 Mon Sep 17 00:00:00 2001 From: stormdragon2976 Date: Fri, 23 Dec 2022 01:37:27 -0500 Subject: [PATCH] New flag added, -q, to prevent launching qjoypad. It can be added to configuration file as noqjoypad=true. --- audiogame-manager.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index f4d53b6..c28f41f 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -398,6 +398,7 @@ help() { echo "The syntax is variable=\"value\"" echo echo "noCache=\"true\" # Do not keep downloaded items in the cache." + echo "noqjoypad=\"true\" # Do not launch qjoypad." echo "norh=\"true\" # Do not install RHVoice." echo "redownload=\"true\" # Redownload sources, do not use the version stored in cache." echo "rhvoice=\"voicename\" # Select the voice to be installed (default Bdl)." @@ -731,10 +732,12 @@ game_launcher() { if command -v qjoypad &> /dev/null ; then mkdir -p ~/.qjoypad3 touch "${HOME}/.qjoypad3/${game%|*}.lyt" - if pgrep qjoypad &> /dev/null ; then - qjoypad -T "${game%|*}" 2> /dev/null - else - qjoypad -T "${game%|*}" 2> /dev/null & + if [[ "${noqjoypad}" != "true" ]]; then + if pgrep qjoypad &> /dev/null ; then + qjoypad -T "${game%|*}" 2> /dev/null + else + qjoypad -T "${game%|*}" 2> /dev/null & + fi fi fi # for games that require custom scripts before launch or custom launch parameters @@ -1108,6 +1111,7 @@ declare -A command=( [N]="No cache, delete the installer after it has been extracted." [n]="No RHVoice, do not install RHVoice when the game is installed." [P]="Print a list of packages required by audiogame-manager." + [q]="No qjoypad. Does not launch qjoypad if it is detected." [R]="Redownload. Removes old versions of packages from cache before installing." [r]="Remove a game. This will delete all game data." [t]="Total games. Show how many games are currently available." @@ -1137,6 +1141,9 @@ while getopts "${args}" i ; do N) noCache="true";; n) norh="true";; P) checklist quiet;; + q) + noqjoypad="true" + game_launcher;; R) redownload="true";; r) game_removal;; t)