Skip to content

Commit 1faa38e

Browse files
committed
Update
1 parent b689040 commit 1faa38e

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

.github/workflows/Tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ on: [push, pull_request]
55
jobs:
66
Test:
77

8-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-latest
99

1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v4
1212
with:
1313
submodules: recursive
14-
14+
1515
- name: Update Packages
1616
run: sudo apt-get update
1717

@@ -25,4 +25,4 @@ jobs:
2525
run: cmake --build build
2626

2727
- name: Test
28-
run: ./build/test/raylib-physfs-test
28+
run: ctest --test-dir build --output-on-failure

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ Load [raylib](https://www.raylib.com/) images, sounds, music, fonts and shaders
1313
- Enumerate across multiple archives and mounted paths
1414
- Save files through PhysFS
1515
- Set all file loading to use PhysFS via `SetPhysFSCallbacks()`
16-
- Find the user's configuration directory with `GetPerfDirectory()`
16+
- Find the user's configuration directory with `GetPrefDirectory()`
1717

1818
## Usage
1919

2020
This is a header-only library. To use it, you have to do two things...
2121

2222
1. Link raylib and physfs. With CMake, you will see examples of linking physfs in [examples/CMakeLists.txt](examples/CMakeLists.txt)
23-
2. Define `RAYLIB_PHYSFS_IMPLEMENTATION` in one `.c` source file before including [`raylib-physfs.h`](include/raylib-physfs.h)
23+
2. Define `RAYLIB_PHYSFS_IMPLEMENTATION` in one `.c` source file before including [`raylib-physfs.h`](raylib-physfs.h)
2424

2525
### Example
2626

@@ -58,10 +58,10 @@ bool MountPhysFSFromMemory(const unsigned char *fileData, int dataSize, const ch
5858
bool UnmountPhysFS(const char* oldDir); // Unmounts the given directory
5959
bool FileExistsInPhysFS(const char* fileName); // Check if the given file exists in PhysFS
6060
bool DirectoryExistsInPhysFS(const char* dirPath); // Check if the given directory exists in PhysFS
61-
unsigned char* LoadFileDataFromPhysFS(const char* fileName, unsigned int* bytesRead); // Load a data buffer from PhysFS (memory should be freed)
61+
unsigned char* LoadFileDataFromPhysFS(const char* fileName, int* bytesRead); // Load a data buffer from PhysFS (memory should be freed)
6262
char* LoadFileTextFromPhysFS(const char* fileName); // Load text from a file (memory should be freed)
6363
bool SetPhysFSWriteDirectory(const char* newDir); // Set the base directory where PhysFS should write files to (defaults to the current working directory)
64-
bool SaveFileDataToPhysFS(const char* fileName, void* data, unsigned int bytesToWrite); // Save the given file data in PhysFS
64+
bool SaveFileDataToPhysFS(const char* fileName, void* data, int bytesToWrite); // Save the given file data in PhysFS
6565
bool SaveFileTextToPhysFS(const char* fileName, char* text); // Save the given file text in PhysFS
6666
FilePathList LoadDirectoryFilesFromPhysFS(const char* dirPath); // Get filenames in a directory path (memory should be freed)
6767
long GetFileModTimeFromPhysFS(const char* fileName); // Get file modification time (last write time) from PhysFS

raylib-physfs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void TracePhysFSError(const char* detail) {
122122
*/
123123
unsigned char* LoadFileDataFromPhysFS(const char* fileName, int* bytesRead) {
124124
if (!FileExistsInPhysFS(fileName)) {
125-
TraceLog(LOG_WARNING, TextFormat("PHYSFS: Tried to load unexisting file '%s'", fileName));
125+
TraceLog(LOG_WARNING, TextFormat("PHYSFS: Tried to load non-existent file '%s'", fileName));
126126
*bytesRead = 0;
127127
return 0;
128128
}

test/raylib-physfs-test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,15 @@ int main(int argc, char *argv[]) {
138138
// SetPhysFSCallbacks()
139139
SetPhysFSCallbacks();
140140

141-
// GetPerfDirectory
141+
// GetPrefDirectory
142142
const char* perfDir = GetPrefDirectory("RobLoach", "raylib-physfs-test");
143143
AssertNotEqual(perfDir, 0);
144144

145145
// ClosePhysFS()
146146
Assert(ClosePhysFS());
147147

148148
TraceLog(LOG_INFO, "================================");
149-
TraceLog(LOG_INFO, "raylib-physfs-test succesful");
149+
TraceLog(LOG_INFO, "raylib-physfs-test successful");
150150
TraceLog(LOG_INFO, "================================");
151151

152152
return 0;

0 commit comments

Comments
 (0)