-
-
Notifications
You must be signed in to change notification settings - Fork 49
Description
Hi. I am on NixOS 24.11 and using the distributed client executable from the repo.
I found that I cannot gracefully restart the game by clicking the "Restart" button that appears after I tick the fullscreen mode option and vice versa.
Once the game exits, it prints Returning from relaunching game, exiting this process on the console and doesn't actually restart the game.
With lldb and a breakpoint at minorGems/game/platforms/SDL/gameSDL.cpp:5550:
(lldb) b gameSDL.cpp:5550
....
* thread #1, name = 'OneLife', stop reason = breakpoint 1.1
frame #0: 0x0000555555735b48 OneLife`relaunchGame() at gameSDL.cpp:5550:30
5547
5548 char relaunchGame() {
5549 char *launchTarget =
-> 5550 autoSprintf( "./%s", getLinuxAppName() );
5551
5552 AppLog::infoF( "Relaunching game %s", launchTarget );
5553
(lldb) print getLinuxAppName()
(const char *) 0x00005555557513d2 "OneLifeApp"
here getLinuxAppName() prints OneLifeApp which I believe should be OneLife, the actual executable name instead.
I have to compile the game from the source and apply my workaround patch below to make the restarting function work:
diff --git a/gameSource/game.cpp b/gameSource/game.cpp
index db6b99c8..2f0d6b66 100644
--- a/gameSource/game.cpp
+++ b/gameSource/game.cpp
@@ -336,7 +336,7 @@ int getAppVersion() {
const char *getLinuxAppName() {
// no dir-name conflict here because we're using all caps for app name
- return "OneLifeApp";
+ return getAppName();
}
I don't know if this bug affects other Linux users or if is it only on my NixOS system.
Thanks.