--- a/misc/libphyslayer/physfsrwops.c Sun Jul 22 02:29:44 2018 +0200
+++ b/misc/libphyslayer/physfsrwops.c Sun Jul 22 02:46:27 2018 +0200
@@ -56,7 +56,7 @@
if (current == -1)
{
SDL_SetError("Can't find position in file: %s",
- PHYSFS_getLastError());
+ PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
return -1;
} /* if */
@@ -77,7 +77,7 @@
const PHYSFS_sint64 len = PHYSFS_fileLength(handle);
if (len == -1)
{
- SDL_SetError("Can't find end of file: %s", PHYSFS_getLastError());
+ SDL_SetError("Can't find end of file: %s", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
return -1;
} /* if */
@@ -98,7 +98,7 @@
if (!PHYSFS_seek(handle, (PHYSFS_uint64) pos))
{
- SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
+ SDL_SetError("PhysicsFS error: %s", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
return -1;
} /* if */
@@ -123,7 +123,7 @@
if (rc != ((PHYSFS_sint64) readlen))
{
if (!PHYSFS_eof(handle)) /* not EOF? Must be an error. */
- SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
+ SDL_SetError("PhysicsFS error: %s", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
} /* if */
#if TARGET_SDL13
@@ -145,7 +145,7 @@
const PHYSFS_uint64 writelen = (PHYSFS_uint64) (num * size);
const PHYSFS_sint64 rc = PHYSFS_writeBytes(handle, ptr, writelen);
if (rc != ((PHYSFS_sint64) writelen))
- SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
+ SDL_SetError("PhysicsFS error: %s", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
#if TARGET_SDL13
return (size_t) rc;
@@ -160,7 +160,7 @@
PHYSFS_File *handle = (PHYSFS_File *) rw->hidden.unknown.data1;
if (!PHYSFS_close(handle))
{
- SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
+ SDL_SetError("PhysicsFS error: %s", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
return -1;
} /* if */
@@ -174,7 +174,7 @@
SDL_RWops *retval = NULL;
if (handle == NULL)
- SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
+ SDL_SetError("PhysicsFS error: %s", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
else
{
retval = SDL_AllocRW();
--- a/misc/libphyslayer/physfsrwops.h Sun Jul 22 02:29:44 2018 +0200
+++ b/misc/libphyslayer/physfsrwops.h Sun Jul 22 02:46:27 2018 +0200
@@ -41,7 +41,7 @@
*
* @param filename File to open in platform-independent notation.
* @return A valid SDL_RWops structure on success, NULL on error. Specifics
- * of the error can be gleaned from PHYSFS_getLastError().
+ * of the error can be gleaned from PHYSFS_getLastErrorCode().
*/
PHYSFS_DECL SDL_RWops *PHYSFSRWOPS_openRead(const char *fname);
@@ -53,7 +53,7 @@
*
* @param filename File to open in platform-independent notation.
* @return A valid SDL_RWops structure on success, NULL on error. Specifics
- * of the error can be gleaned from PHYSFS_getLastError().
+ * of the error can be gleaned from PHYSFS_getLastErrorCode().
*/
PHYSFS_DECL SDL_RWops *PHYSFSRWOPS_openWrite(const char *fname);
@@ -65,7 +65,7 @@
*
* @param filename File to open in platform-independent notation.
* @return A valid SDL_RWops structure on success, NULL on error. Specifics
- * of the error can be gleaned from PHYSFS_getLastError().
+ * of the error can be gleaned from PHYSFS_getLastErrorCode().
*/
PHYSFS_DECL SDL_RWops *PHYSFSRWOPS_openAppend(const char *fname);
@@ -77,7 +77,7 @@
*
* @param handle a valid PhysicsFS file handle.
* @return A valid SDL_RWops structure on success, NULL on error. Specifics
- * of the error can be gleaned from PHYSFS_getLastError().
+ * of the error can be gleaned from PHYSFS_getLastErrorCode().
*/
PHYSFS_DECL SDL_RWops *PHYSFSRWOPS_makeRWops(PHYSFS_File *handle);