Skip to content

Commit

Permalink
Merge pull request #16 from viseztrance/fix-cpp-errors
Browse files Browse the repository at this point in the history
Fix C++ compilation errors
  • Loading branch information
RobLoach authored Mar 18, 2023
2 parents 54f2877 + b0cc6a4 commit 94f19f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions raylib-physfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ extern "C" {
* @internal
*/
void TracePhysFSError(const char* detail) {
int errorCode = PHYSFS_getLastErrorCode();
PHYSFS_ErrorCode errorCode = PHYSFS_getLastErrorCode();
if (errorCode == PHYSFS_ERR_OK) {
TraceLog(LOG_WARNING, TextFormat("PHYSFS: %s", detail));
} else {
Expand All @@ -127,7 +127,7 @@ unsigned char* LoadFileDataFromPhysFS(const char* fileName, unsigned int* bytesR
}

// Open up the file.
void* handle = PHYSFS_openRead(fileName);
PHYSFS_File* handle = PHYSFS_openRead(fileName);
if (handle == 0) {
TracePhysFSError(fileName);
*bytesRead = 0;
Expand Down Expand Up @@ -164,7 +164,7 @@ unsigned char* LoadFileDataFromPhysFS(const char* fileName, unsigned int* bytesR
// Close the file handle, and return the bytes read and the buffer.
PHYSFS_close(handle);
*bytesRead = read;
return buffer;
return (unsigned char*) buffer;
}

/**
Expand Down Expand Up @@ -519,7 +519,7 @@ bool SaveFileDataToPhysFS(const char* fileName, void* data, unsigned int bytesTo
}

// Open the file.
void* handle = PHYSFS_openWrite(fileName);
PHYSFS_File* handle = PHYSFS_openWrite(fileName);
if (handle == 0) {
TracePhysFSError(fileName);
return false;
Expand Down

0 comments on commit 94f19f9

Please sign in to comment.