Skip to content

Commit

Permalink
Fixed asking to restart EmulationStation when debug mode is on
Browse files Browse the repository at this point in the history
  • Loading branch information
hiulit committed Feb 14, 2019
1 parent bdd0988 commit cac8a7d
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions retropie-limit-last-played-games.sh
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ function reset_playcount() {
echo "> Done!"
# Games to show in 'last played' section.
log "Games that will be shown in the 'last played' section:"
echo ""
for last_played_item in "${last_played_array[@]:0:$NTH_LAST_PLAYED}"; do
local game_name
game_name="$last_played_item"
Expand Down Expand Up @@ -398,12 +399,15 @@ function main() {
text+="Check the log file in '$LOG_DIR'."
dialog_msgbox "Info" "$text" "$dialog_height"
fi
# Check if EmulationStation is running
if pidof emulationstation > /dev/null; then
dialog_yesno "Info" "In order to see the changes applied to the game lists, EmulationStation need to be restarted.\n\nWould you like to restart EmulationStation?"
local return_value="$?"
if [[ "$return_value" -eq "$DIALOG_OK" ]]; then
restart_ES

if [[ "$DEBUG_FLAG" -eq 0 ]]; then
# Check if EmulationStation is running
if pidof emulationstation > /dev/null; then
dialog_yesno "Info" "In order to see the changes applied to the game lists, EmulationStation need to be restarted.\n\nWould you like to restart EmulationStation?"
local return_value="$?"
if [[ "$return_value" -eq "$DIALOG_OK" ]]; then
restart_ES
fi
fi
fi
}
Expand Down

0 comments on commit cac8a7d

Please sign in to comment.