diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-12-29 15:36:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-12-29 15:36:38 +0300 |
commit | 7b93bda2932da0cd14da0e08e2b5a34ce03d99cb (patch) | |
tree | 2f7b1aaa0fc0688bcd2fdc5ba91a535becba4086 | |
parent | e37bf9dd8764adaf1b83a98b2abfd140efbb3379 (diff) | |
download | manaplus-7b93bda2932da0cd14da0e08e2b5a34ce03d99cb.tar.gz manaplus-7b93bda2932da0cd14da0e08e2b5a34ce03d99cb.tar.bz2 manaplus-7b93bda2932da0cd14da0e08e2b5a34ce03d99cb.tar.xz manaplus-7b93bda2932da0cd14da0e08e2b5a34ce03d99cb.zip |
Add workaround fix for broken macports libs.
Probably broken physfs.
-rw-r--r-- | src/utils/physfsrwops.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/utils/physfsrwops.cpp b/src/utils/physfsrwops.cpp index e755ea353..67376d3dc 100644 --- a/src/utils/physfsrwops.cpp +++ b/src/utils/physfsrwops.cpp @@ -179,6 +179,10 @@ SDL_RWops *PHYSFSRWOPS_openRead(const char *fname) { if (!fname || !*fname) return nullptr; +#ifdef __APPLE__ + if (!PHYSFS_exists(fname)) + return nullptr; +#endif return create_rwops(PHYSFS_openRead(fname)); } /* PHYSFSRWOPS_openRead */ @@ -186,6 +190,10 @@ SDL_RWops *PHYSFSRWOPS_openWrite(const char *fname) { if (!fname || !*fname) return nullptr; +#ifdef __APPLE__ + if (!PHYSFS_exists(fname)) + return nullptr; +#endif return create_rwops(PHYSFS_openWrite(fname)); } /* PHYSFSRWOPS_openWrite */ @@ -193,6 +201,10 @@ SDL_RWops *PHYSFSRWOPS_openAppend(const char *fname) { if (!fname || !*fname) return nullptr; +#ifdef __APPLE__ + if (!PHYSFS_exists(fname)) + return nullptr; +#endif return create_rwops(PHYSFS_openAppend(fname)); } /* PHYSFSRWOPS_openAppend */ |