Made debug logs optional

This commit is contained in:
Jandalf81
2018-08-02 18:42:13 +02:00
parent dde5c3c509
commit 86405c52e7

View File

@@ -19,7 +19,6 @@ log ()
debug () debug ()
{ {
log "DEBUG" "Started a ROM"
log "DEBUG" "direction: ${direction}" log "DEBUG" "direction: ${direction}"
log "DEBUG" "system: ${system}" log "DEBUG" "system: ${system}"
log "DEBUG" "emulator: ${emulator}" log "DEBUG" "emulator: ${emulator}"
@@ -38,11 +37,12 @@ killOtherNotification ()
# get PID of other PNGVIEW process # get PID of other PNGVIEW process
otherPID=$(pgrep --full pngview) otherPID=$(pgrep --full pngview)
log "DEBUG" "Other PIDs: ${otherPID}" if [ "${debug}" = "1" ]; then log "DEBUG" "Other PIDs: ${otherPID}"; fi
if [ "${otherPID}" != "" ] if [ "${otherPID}" != "" ]
then then
log "DEBUG" "Kill other PNGVIEW ${otherPID}" if [ "${debug}" = "1" ]; then log "DEBUG" "Kill other PNGVIEW ${otherPID}"; fi
kill ${otherPID} kill ${otherPID}
fi fi
} }
@@ -60,7 +60,7 @@ showNotification ()
if [ "$3" = "" ] if [ "$3" = "" ]
then then
timeout="5000" timeout="10000"
else else
timeout="$3" timeout="$3"
fi fi
@@ -189,7 +189,7 @@ getROMFileName
prepareFilter prepareFilter
getTypeOfRemote getTypeOfRemote
#debug if [ "${debug}" = "1" ]; then debug; fi
if [ "${direction}" == "up" ] if [ "${direction}" == "up" ]
then then