From e1a7c1d0ca30c2c4a293ffbff6b9c51c881d23e3 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Mon, 29 Jan 2024 11:09:51 +0100 Subject: Updated PhysFS RWops helper to the latest version Fixes compatibility with SDL2. The old version compiled for whatever reason, but it would crash when the client tried to play a sound. --- src/utils/physfsrwops.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/utils/physfsrwops.h') diff --git a/src/utils/physfsrwops.h b/src/utils/physfsrwops.h index 8008b224..04ad255d 100644 --- a/src/utils/physfsrwops.h +++ b/src/utils/physfsrwops.h @@ -15,7 +15,8 @@ * Unless otherwise stated, the rest of PhysicsFS falls under the zlib license. * Please see LICENSE.txt in the root of the source tree. * - * SDL falls under the LGPL license. You can get SDL at http://www.libsdl.org/ + * SDL 1.2 falls under the LGPL license. SDL 1.3+ is zlib, like PhysicsFS. + * You can get SDL at https://www.libsdl.org/ * * This file was written by Ryan C. Gordon. (icculus@icculus.org). */ @@ -40,7 +41,7 @@ extern "C" { * @return A valid SDL_RWops structure on success, NULL on error. Specifics * of the error can be gleaned from PHYSFS_getLastError(). */ -SDL_RWops *PHYSFSRWOPS_openRead(const char *fname); +PHYSFS_DECL SDL_RWops *PHYSFSRWOPS_openRead(const char *fname); /** * Open a platform-independent filename for writing, and make it accessible @@ -52,7 +53,7 @@ SDL_RWops *PHYSFSRWOPS_openRead(const char *fname); * @return A valid SDL_RWops structure on success, NULL on error. Specifics * of the error can be gleaned from PHYSFS_getLastError(). */ -SDL_RWops *PHYSFSRWOPS_openWrite(const char *fname); +PHYSFS_DECL SDL_RWops *PHYSFSRWOPS_openWrite(const char *fname); /** * Open a platform-independent filename for appending, and make it accessible @@ -64,7 +65,7 @@ SDL_RWops *PHYSFSRWOPS_openWrite(const char *fname); * @return A valid SDL_RWops structure on success, NULL on error. Specifics * of the error can be gleaned from PHYSFS_getLastError(). */ -SDL_RWops *PHYSFSRWOPS_openAppend(const char *fname); +PHYSFS_DECL SDL_RWops *PHYSFSRWOPS_openAppend(const char *fname); /** * Make a SDL_RWops from an existing PhysicsFS file handle. You should @@ -76,7 +77,7 @@ SDL_RWops *PHYSFSRWOPS_openAppend(const char *fname); * @return A valid SDL_RWops structure on success, NULL on error. Specifics * of the error can be gleaned from PHYSFS_getLastError(). */ -SDL_RWops *PHYSFSRWOPS_makeRWops(PHYSFS_File *handle); +PHYSFS_DECL SDL_RWops *PHYSFSRWOPS_makeRWops(PHYSFS_File *handle); #ifdef __cplusplus } -- cgit v1.2.3-60-g2f50