Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some games do not fully quit without manually terminating bash process #7

Closed
gPhantasm opened this issue Dec 31, 2023 · 5 comments
Closed

Comments

@gPhantasm
Copy link

After running EoSD and PCB through Steam with the command thcrap_proton -- LANG=ja_JP.UTF-8 %command%, the games do not appear as closed in Steam. Checking running processes through htop confirms that the bash command running thcrap_proton is still running after the game is closed. The game is properly closed once this bash process is terminated/killed. This does not occur for newer games, such as those available on Steam.

@redirectto
Copy link
Contributor

I've already fixed the detection of EoSD and Uwabami breakers on my fork https://github.com/redirectto/thprac-steam-proton-wrapper use that instead for those games (sadly I couldn't fix thprac on non-steam games, but the rest of the script work just fine)

About PCB I've already tried it on base thcrap-steam-proton-wrapper and it works perfectly make sure your game is named "th07.exe", it also works with vpatch

@redirectto
Copy link
Contributor

@tactikauan or @Maxmani you can fix the detection of the games (EoSD and uwabami Breakers) by adding this next piece of code after the line that launches the game and by replacing TH_PID with GAME_PID when checking if the game is still running, I added .* on the other regex in order to also detect modded instances of the games.

TH_REGEX="th[0-9].*\.exe"
ALCOSTG_REGEX="alcostg.*\.exe"
TH06_REGEX="東方紅魔郷.*"

# Get PID while ensuring one of the games is launched
while [ -z "$TH_PID" ] && [ -z "$ALCOSTG_PID" ] && [ -z "$TH06_PID" ]; do # Loop until a matching process is found
    TH_PID=$(pgrep "$TH_REGEX")
    TH06_PID=$(pgrep "$TH06_REGEX")
    ALCOSTG_PID=$(pgrep "$ALCOSTG_REGEX")
    sleep 1
done

if [ -n "$TH06_PID" ]; then
    GAME_PID="$TH06_PID"
elif [ -n "$ALCOSTG_PID" ]; then
    GAME_PID="$ALCOSTG_PID"
else
    GAME_PID="$TH_PID"
fi

@gPhantasm
Copy link
Author

I've already fixed the detection of EoSD and Uwabami breakers on my fork https://github.com/redirectto/thprac-steam-proton-wrapper use that instead for those games (sadly I couldn't fix thprac on non-steam games, but the rest of the script work just fine)

About PCB I've already tried it on base thcrap-steam-proton-wrapper and it works perfectly make sure your game is named "th07.exe", it also works with vpatch

Thanks, turns out I just hadn't chosen the correct PCB executable. I will try your fork for EoSD as well. Maybe that PID change should be a pull request?

@tactikauan
Copy link
Owner

Hi, sorry for the late response (wasn't home for a few days). I added support for EoSD detection, which also fixes vpatch.

About the script hanging, this is a problem in thcrap_loader, which hangs in Wine. We have a workaround in place, but this should ideally be fixed in thcrap itself. I'll investigate some more and open an issue there.

@tactikauan
Copy link
Owner

See thpatch/thcrap#251.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants