jonof / jfduke3d

Port of the 3D Realms game "Duke Nukem 3D"
http://www.jonof.id.au/jfduke3d
110 stars 18 forks source link

Games saved on a jfduke3d run don't appear on the next run #13

Closed vanfanel closed 3 years ago

vanfanel commented 3 years ago

Hi there,

I was about to have a good time playing jfduke3d on Debian 10 aarch64, but I have noticed saved games are missing from the LOAD menu next time I run the engine.

I can save the game and load it fine, and I can do it as many times as I want, but if I exit back to the TTY console, the engine doesn't show the games on the LOAD menu.

I can see the saved game as ~/.jfduke3d/game0.sav, and it is in fact recreated every time I save. It's 152KB in size.

I have tried the original duke3d.grp and also the ATOMIC EDITION duke3d.grp, and this behavior happens in both.

Any clues on what's going on, please?

vanfanel commented 3 years ago

@jonof Do I need to have my user on a group for savegames to be visible on the LOAD menu of something like that?

jonof commented 3 years ago

The solution is this:

--- a/src/config.c
+++ b/src/config.c
@@ -507,7 +507,7 @@ void CONFIG_SetupJoystick( void )

 void readsavenames(void)
 {
-    long dummy;
+    int dummy;
     short i;
     char fn[13];
     BFILE *fil;

I'll fix it in the repository soon.

vanfanel commented 3 years ago

@jonof Ah!! Thanks a lot!! :)