projects
/
pmprecache.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8afb616
)
Remove Unix platform dependency in fileExists()
author
MegaBrutal
<megabrutal+github@megabrutal.com>
Sun, 31 Dec 2023 01:15:00 +0000
(
02:15
+0100)
committer
MegaBrutal
<megabrutal+github@megabrutal.com>
Sun, 31 Dec 2023 01:15:00 +0000
(
02:15
+0100)
dllapi.cpp
patch
|
blob
|
history
diff --git
a/dllapi.cpp
b/dllapi.cpp
index acc2906f7fbdf14bc4760285ef06b3c4ed3d5467..75e920c16bb8aff499b31b1548a706f3ff164d46 100644
(file)
--- a/
dllapi.cpp
+++ b/
dllapi.cpp
@@
-32,8
+32,6
@@
*
*/
-#include <unistd.h>
-
#include <extdll.h>
#include <dllapi.h>
@@
-67,10
+65,8
@@
typedef struct {
precache_entry precache_list[MAX_PRECACHE_COUNT];
unsigned short int precache_count = 0;
-bool fileExists(const char* path) {
- char fullpath[256];
- snprintf(fullpath, sizeof(fullpath), "%s/%s", &gGamedir[0], path);
- return access(fullpath, R_OK) == 0;
+bool fileExists(char* path) {
+ return g_engfuncs.pfnGetFileSize(path) != -1;
}
bool addPrecacheEntry(const char* playername, const char* model) {