text saves now utilize the save path

This commit is contained in:
fgsfds 2020-06-05 20:23:18 +03:00
parent f1393a4431
commit e9f0519bc4
1 changed files with 3 additions and 3 deletions

View File

@ -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 */