|
|
@ -18,7 +18,7 @@ typedef struct unity_syscalls_s |
|
|
int(*SysFileRead)(void *target, int handle, void *dest, int count); |
|
|
int(*SysFileRead)(void *target, int handle, void *dest, int count); |
|
|
int(*SysFileWrite)(void *target, int handle, const void *data, int count); |
|
|
int(*SysFileWrite)(void *target, int handle, const void *data, int count); |
|
|
int(*SysFileTime)(void *target, const char *path); |
|
|
int(*SysFileTime)(void *target, const char *path); |
|
|
void(*SysMkDir)(void *target, const char *path); |
|
|
|
|
|
|
|
|
qboolean(*SysMkDir)(void *target, const char *path); |
|
|
} unity_syscalls_t; |
|
|
} unity_syscalls_t; |
|
|
|
|
|
|
|
|
const unity_syscalls_t *unity_syscalls; |
|
|
const unity_syscalls_t *unity_syscalls; |
|
|
@ -94,11 +94,8 @@ int Sys_FileTime(const char *path) |
|
|
|
|
|
|
|
|
void Sys_mkdir(const char *path) |
|
|
void Sys_mkdir(const char *path) |
|
|
{ |
|
|
{ |
|
|
unity_syscalls->SysMkDir(unity_syscalls->target, path); |
|
|
|
|
|
|
|
|
|
|
|
// TODO: handle creation errors |
|
|
|
|
|
/*if (GetLastError() != ERROR_ALREADY_EXISTS) |
|
|
|
|
|
Sys_Error("Unable to create directory %s", path);*/ |
|
|
|
|
|
|
|
|
if (!unity_syscalls->SysMkDir(unity_syscalls->target, path)) |
|
|
|
|
|
Sys_Error("Unable to create directory %s", path); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Sys_Sleep_New(unsigned long msecs) |
|
|
void Sys_Sleep_New(unsigned long msecs) |
|
|
|