Suppress physfsx read/write macros in physfsrwops.cpp

This commit is contained in:
Kp 2015-07-25 23:10:48 +00:00
parent 4a6ae13367
commit cfd08b5d6c

View file

@ -106,7 +106,7 @@ static int physfsrwops_seek(SDL_RWops *rw, int offset, int whence)
static int physfsrwops_read(SDL_RWops *rw, void *ptr, int size, int maxnum)
{
PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
PHYSFS_sint64 rc = PHYSFS_read(handle, ptr, size, maxnum);
PHYSFS_sint64 rc = (PHYSFS_read)(handle, ptr, size, maxnum);
if (rc != maxnum)
{
if (!PHYSFS_eof(handle)) /* not EOF? Must be an error. */
@ -120,7 +120,7 @@ static int physfsrwops_read(SDL_RWops *rw, void *ptr, int size, int maxnum)
static int physfsrwops_write(SDL_RWops *rw, const void *ptr, int size, int num)
{
PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
PHYSFS_sint64 rc = PHYSFS_write(handle, ptr, size, num);
PHYSFS_sint64 rc = (PHYSFS_write)(handle, reinterpret_cast<const uint8_t *>(ptr), size, num);
if (rc != num)
SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());