Skip to content

Commit

Permalink
Update Storage base path, use provided SDL base path
Browse files Browse the repository at this point in the history
  • Loading branch information
raysan5 committed Jul 1, 2024
1 parent 4c90fc6 commit c8313d9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/platforms/rcore_desktop_sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1576,13 +1576,15 @@ int InitPlatform(void)
CORE.Time.previous = GetTime(); // Get time as double

#if defined(_WIN32) && defined(SUPPORT_WINMM_HIGHRES_TIMER) && !defined(SUPPORT_BUSY_WAIT_LOOP)
SDL_SetHint(SDL_HINT_TIMER_RESOLUTION, "1"); // SDL equivalent of timeBeginPeriod() and timeEndPeriod()
SDL_SetHint(SDL_HINT_TIMER_RESOLUTION, "1"); // SDL equivalent of timeBeginPeriod() and timeEndPeriod()
#endif
//----------------------------------------------------------------------------

// Initialize storage system
//----------------------------------------------------------------------------
CORE.Storage.basePath = GetWorkingDirectory(); // Define base path for storage
// Define base path for storage
CORE.Storage.basePath = SDL_GetBasePath(); // Alternative: GetWorkingDirectory();
CHDIR(CORE.Storage.basePath);
//----------------------------------------------------------------------------

TRACELOG(LOG_INFO, "PLATFORM: DESKTOP (SDL): Initialized successfully");
Expand Down

0 comments on commit c8313d9

Please sign in to comment.