Skip to content

Commit

Permalink
filesystem: set default values for quick/autosave aged count
Browse files Browse the repository at this point in the history
  • Loading branch information
a1batross committed Jan 20, 2025
1 parent 17a71ff commit a1da10f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions filesystem/filesystem.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ GNU General Public License for more details.
#include "common/protocol.h"

#define FILE_COPY_SIZE (1024 * 1024)
#define SAVE_AGED_COUNT 2 // the default count of quick and auto saves

fs_globals_t FI;
qboolean fs_ext_path = false; // attempt to read\write from ./ or ../ pathes
Expand Down Expand Up @@ -628,13 +629,11 @@ static qboolean FS_WriteGameInfo( const char *filepath, gameinfo_t *GameInfo )
if( GameInfo->noskills )
FS_Printf( f, "noskills\t\t\"%i\"\n", GameInfo->noskills );

#define SAVE_AGED_COUNT 2 // the default count of quick and auto saves
if( GameInfo->quicksave_aged_count != SAVE_AGED_COUNT )
FS_Printf( f, "quicksave_aged_count\t\t%d\n", GameInfo->quicksave_aged_count );

if( GameInfo->autosave_aged_count != SAVE_AGED_COUNT )
FS_Printf( f, "autosave_aged_count\t\t%d\n", GameInfo->autosave_aged_count );
#undef SAVE_AGED_COUNT

// HL25 compatibility
if( GameInfo->animated_title )
Expand Down Expand Up @@ -700,6 +699,9 @@ static void FS_InitGameInfo( gameinfo_t *GameInfo, const char *gamedir, qboolean
GameInfo->max_beams = 128;
GameInfo->max_particles = 4096;
GameInfo->version = 1.0f;

GameInfo->quicksave_aged_count = SAVE_AGED_COUNT;
GameInfo->autosave_aged_count = SAVE_AGED_COUNT;
}

static void FS_ParseGenericGameInfo( gameinfo_t *GameInfo, const char *buf, const qboolean isGameInfo )
Expand Down

0 comments on commit a1da10f

Please sign in to comment.