New flag added, -q, to prevent launching qjoypad. It can be added to configuration file as noqjoypad=true.

This commit is contained in:
stormdragon2976 2022-12-23 01:37:27 -05:00
parent dee46cb51e
commit 7f9194828a
1 changed files with 11 additions and 4 deletions

View File

@ -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)