diff options
| author | jussi | 2024-05-20 15:45:31 +0300 |
|---|---|---|
| committer | jussi | 2024-05-20 15:45:31 +0300 |
| commit | 9edaf7a47b02bd351c400f0c6aec517884449551 (patch) | |
| tree | cf7019c08a033cb0b3739cdbcbb40b7c55fbad89 /src/state.c | |
| parent | e84be852546aecf3e151fd8bb92db88a068c1ea1 (diff) | |
| download | reilua-enhanced-9edaf7a47b02bd351c400f0c6aec517884449551.tar.gz reilua-enhanced-9edaf7a47b02bd351c400f0c6aec517884449551.tar.bz2 reilua-enhanced-9edaf7a47b02bd351c400f0c6aec517884449551.zip | |
Use GetApplicationDirectory instead of GetWorkingDirectory for basePath if no path argument given.
Diffstat (limited to 'src/state.c')
| -rw-r--r-- | src/state.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/state.c b/src/state.c index ea737d4..52742e5 100644 --- a/src/state.c +++ b/src/state.c @@ -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 ); } |
