From e9f0519bc47a7a05e6efa7965ba568dc94ccc818 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Fri, 5 Jun 2020 20:23:18 +0300 Subject: [PATCH] text saves now utilize the save path --- src/game/text_save.inc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/text_save.inc.h b/src/game/text_save.inc.h index 0c34f1b8..39ad1fc4 100644 --- a/src/game/text_save.inc.h +++ b/src/game/text_save.inc.h @@ -4,7 +4,7 @@ #include "course_table.h" #include "pc/ini.h" -#define FILENAME_FORMAT "save_file_%d.sav" +#define FILENAME_FORMAT "%s/save_file_%d.sav" #define NUM_COURSES 15 #define NUM_BONUS_COURSES 10 #define NUM_FLAGS 21 @@ -87,7 +87,7 @@ static s32 write_text_save(s32 fileIndex) { u32 i, bit, flags, coins, stars, starFlags; /* Define savefile's name */ - if (sprintf(filename, FILENAME_FORMAT, fileIndex) < 0) + if (sprintf(filename, FILENAME_FORMAT, sys_save_path(), fileIndex) < 0) return -1; file = fopen(filename, "wt"); @@ -212,7 +212,7 @@ static s32 read_text_save(s32 fileIndex) { u32 capArea; /* Define savefile's name */ - if (sprintf(filename, FILENAME_FORMAT, fileIndex) < 0) + if (sprintf(filename, FILENAME_FORMAT, sys_save_path(), fileIndex) < 0) return -1; /* Try to open the file */