Use GetApplicationDirectory instead of GetWorkingDirectory for basePath if no path argument given.

This commit is contained in:
jussi
2024-05-20 15:45:31 +03:00
parent e84be85254
commit 9edaf7a47b
9 changed files with 25 additions and 23 deletions

View File

@@ -6,11 +6,11 @@
State* state;
bool stateInit( int argn, const char** argc, const char* exePath ) {
bool stateInit( int argn, const char** argc, const char* basePath ) {
state = malloc( sizeof( State ) );
state->exePath = malloc( STRING_LEN * sizeof( char ) );
strncpy( state->exePath, exePath, STRING_LEN - 1 );
state->basePath = malloc( STRING_LEN * sizeof( char ) );
strncpy( state->basePath, basePath, STRING_LEN - 1 );
state->hasWindow = true;
state->run = true;
@@ -65,7 +65,7 @@ void stateFree() {
#ifdef PLATFORM_DESKTOP_SDL
free( state->SDL_eventQueue );
#endif
free( state->exePath );
free( state->basePath );
free( state->RLGLcurrentShaderLocs );
free( state );
}