summaryrefslogtreecommitdiff
path: root/saveload.c
diff options
context:
space:
mode:
Diffstat (limited to 'saveload.c')
-rw-r--r--saveload.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/saveload.c b/saveload.c
index 653ff2402..3b304f445 100644
--- a/saveload.c
+++ b/saveload.c
@@ -19,6 +19,7 @@
#include "openttd.h"
#include "debug.h"
#include "functions.h"
+#include "hal.h"
#include "vehicle.h"
#include "station.h"
#include "thread.h"
@@ -1314,12 +1315,6 @@ extern bool AfterLoadGame(void);
extern void BeforeSaveGame(void);
extern bool LoadOldSaveGame(const char *file);
-#if defined(__APPLE__) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3)
-extern const char *convert_to_fs_charset(const char *filename);
-#else
-#define convert_to_fs_charset(str) (str)
-#endif
-
/** Small helper function to close the to be loaded savegame an signal error */
static inline SaveOrLoadResult AbortSaveLoad(void)
{
@@ -1454,11 +1449,7 @@ SaveOrLoadResult SaveOrLoad(const char *filename, int mode)
return SL_OK;
}
- if(mode == SL_SAVE) {
- _sl.fh = fopen(convert_to_fs_charset(filename), "wb");
- } else {
- _sl.fh = fopen(filename, "rb");
- }
+ _sl.fh = (mode == SL_SAVE) ? fopen(OTTD2FS(filename), "wb") : fopen(filename, "rb");
if (_sl.fh == NULL) {
DEBUG(misc, 0) ("[Sl] Cannot open savegame for saving/loading.");
return SL_ERROR;