libTAS
libTAS copied to clipboard
Closing the UI while the game is running leads to the game becoming completely unresponsive
If you close the UI while a game is running, the game becomes completely unresponsive, and cannot be quit normally, requiring a hard kill with the kill command. There is no purpose afaik to keeping the game open at this point, so we should kill the game. I'm not sure, but I believe doing this would look like taking lines 1465-1478 of MainWindow.cpp, pulling them into a killGame utility method somewhere, and calling that method in MainWindow::~MainWindow.
After looking into the code more carefully, it seems this shouldn't be happening because of code in program/main.c... The game should be killed by line 402 of main.cpp. I'll look more into this and create a more detailed bug report.
Mhhh, maybe we shouldn't trust context.status to determine if the game is still executing. Or maybe the program exited early and this code didn't execute.
Commit f9d584e4d4081f341ba3fe3b4682f722e37eea38 fixed a crash when closing UI while game is running. Maybe this will fix the issue for you? The game is closing as expected for me when closing libTAS main window.