diff --git a/source/duke3d/src/player.cpp b/source/duke3d/src/player.cpp index 71cc217ad..d5e41118b 100644 --- a/source/duke3d/src/player.cpp +++ b/source/duke3d/src/player.cpp @@ -5640,7 +5640,7 @@ HORIZONLY:; #define SJSON_IMPLEMENT #include "sjson.h" -int portableBackupSave(const char * path, int volume, int level) +int portableBackupSave(const char * path, const char * name, int volume, int level) { if (!FURY) return 0; @@ -5661,6 +5661,7 @@ int portableBackupSave(const char * path, int volume, int level) sjson_node * root = sjson_mkobject(ctx); + sjson_put_string(ctx, root, "name", name); // sjson_put_string(ctx, root, "map", currentboardfilename); sjson_put_int(ctx, root, "volume", volume); sjson_put_int(ctx, root, "level", level); diff --git a/source/duke3d/src/player.h b/source/duke3d/src/player.h index cc4623678..393a85d9b 100644 --- a/source/duke3d/src/player.h +++ b/source/duke3d/src/player.h @@ -417,6 +417,6 @@ static inline int P_Get(int32_t spriteNum) { return P_GetP((uspriteptr_t)&sprite } #endif -extern int portableBackupSave(const char *, int, int); +extern int portableBackupSave(const char *, const char *, int, int); #endif diff --git a/source/duke3d/src/savegame.cpp b/source/duke3d/src/savegame.cpp index 0d8f85d79..4acd24074 100644 --- a/source/duke3d/src/savegame.cpp +++ b/source/duke3d/src/savegame.cpp @@ -822,7 +822,7 @@ int32_t G_SavePlayer(savebrief_t & sv, bool isAutoSave) VM_OnEvent(EVENT_SAVEGAME, g_player[screenpeek].ps->i, screenpeek); - portableBackupSave(sv.path, ud.last_stateless_volume, ud.last_stateless_level); + portableBackupSave(sv.path, sv.name, ud.last_stateless_volume, ud.last_stateless_level); // SAVE! sv_saveandmakesnapshot(fil, sv.name, 0, 0, 0, 0, isAutoSave);