From 88af4d7c838e1cca2969e3d1c85d0a8678ec8d2f Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sun, 20 Oct 2019 20:34:22 +1100 Subject: [PATCH] fix web client and windows builds not compiling --- src/Platform.c | 6 +++--- src/Platform.h | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Platform.c b/src/Platform.c index fef4d0101..8a7726875 100644 --- a/src/Platform.c +++ b/src/Platform.c @@ -1716,7 +1716,7 @@ int Platform_GetCommandLineArgs(int argc, STRING_REF char** argv, String* args) return i; } -cc_result Platform_SetDefaultCurrentDirectory(void) { +cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) { TCHAR path[NATIVE_STR_LEN + 1]; int i, len; cc_result res = Process_RawGetExePath(path, &len); @@ -1740,7 +1740,7 @@ int Platform_GetCommandLineArgs(int argc, STRING_REF char** argv, String* args) return count; } -cc_result Platform_SetDefaultCurrentDirectory(void) { +cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) { return chdir("/classicube") == -1 ? errno : 0; } #elif defined CC_BUILD_ANDROID @@ -1749,7 +1749,7 @@ int Platform_GetCommandLineArgs(int argc, STRING_REF char** argv, String* args) return String_UNSAFE_Split(&gameArgs, ' ', args, GAME_MAX_CMDARGS); } -cc_result Platform_SetDefaultCurrentDirectory(void) { +cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) { String dir; char dirBuffer[FILENAME_SIZE + 1]; String_InitArray_NT(dir, dirBuffer); diff --git a/src/Platform.h b/src/Platform.h index 7dc0dcbc0..79319b659 100644 --- a/src/Platform.h +++ b/src/Platform.h @@ -41,11 +41,7 @@ void Platform_Init(void); /* Frees the platform specific state. */ void Platform_Free(void); /* Sets the appropriate default current/working directory. */ -#if defined CC_BUILD_POSIX cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv); -#else -cc_result Platform_SetDefaultCurrentDirectory(void); -#endif /* Gets the command line arguments passed to the program. */ int Platform_GetCommandLineArgs(int argc, STRING_REF char** argv, String* args);