diff --git a/NonSteamLaunchers.sh b/NonSteamLaunchers.sh index dfed66c..8823e80 100755 --- a/NonSteamLaunchers.sh +++ b/NonSteamLaunchers.sh @@ -1903,23 +1903,17 @@ if [[ $options == *"Battle.net"* ]]; then echo "Running BATTLE file using Proton with the /passive option" "$STEAM_RUNTIME" "$proton_dir/proton" run "$battle_file" Battle.net-Setup.exe --lang=enUS --installpath="C:\Program Files (x86)\Battle.net" - # Wait for the process to finish or timeout after a certain number of attempts - max_attempts=20 - attempt=0 while true; do if pgrep -f "Battle.net.exe" || pgrep -f "BlizzardError.exe" > /dev/null; then pkill -f "Battle.net.exe" || pkill -f "BlizzardError.exe" break fi sleep 1 - ((attempt++)) - if [ "$attempt" -ge "$max_attempts" ]; then - echo "Timeout: Battle.net process did not terminate." - break - fi done + + # Wait for the bnet file to finish running + wait fi -wait # wait for Google Chrome to finish wait