Browse Source

loading save ignore case; make max samplerate in config up to 49716 for platforms support native arbitrary samplerate

Pal Lockheart 7 years ago
parent
commit
f832fa34cf
2 changed files with 5 additions and 3 deletions
  1. 4 2
      global.c
  2. 1 1
      palcfg.h

+ 4 - 2
global.c

@@ -575,7 +575,7 @@ PAL_LoadGame_Common(
 	//
 	// Try to open the specified file
 	//
-	FILE *fp = fopen(szFileName, "rb");
+	FILE *fp = UTIL_OpenRequiredFileForMode(szFileName, "rb");
 	//
 	// Read all data from the file and close.
 	//
@@ -921,7 +921,9 @@ PAL_InitGameData(
    //
    // try loading from the saved game file.
    //
-   if (iSaveSlot == 0 || PAL_LoadGame(va("%s%d%s", gConfig.pszSavePath, iSaveSlot, ".rpg")) != 0)
+   char saveFileName[PAL_MAX_PATH];
+   snprintf(saveFileName, PAL_MAX_PATH, "%d%s", iSaveSlot, ".rpg");
+   if (iSaveSlot == 0 || PAL_LoadGame(saveFileName) != 0)
    {
       //
       // Cannot load the saved game file. Load the defaults.

+ 1 - 1
palcfg.h

@@ -29,7 +29,7 @@
 #include "common.h"
 #include "palcommon.h"
 
-#define     PAL_MAX_SAMPLERATE           48000
+#define     PAL_MAX_SAMPLERATE           49716
 #define     PAL_MAX_VOLUME               100
 
 typedef enum tagPALCFG_ITEM