Add SetMediaPath() to change screenshot/gif recording directory
This commit is contained in:
parent
f106301d46
commit
4127733677
8 changed files with 18 additions and 3 deletions
|
|
@ -818,6 +818,7 @@ int InitPlatform(void)
|
|||
InitAssetManager(platform.app->activity->assetManager, platform.app->activity->internalDataPath); // Initialize assets manager
|
||||
|
||||
CORE.Storage.basePath = platform.app->activity->internalDataPath; // Define base path for storage
|
||||
strncpy(CORE.Storage.mediaPath, CORE.Storage.basePath, MAX_FILEPATH_LENGTH - 1); // Define base path for media storage
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
TRACELOG(LOG_INFO, "PLATFORM: ANDROID: Initialized successfully");
|
||||
|
|
|
|||
|
|
@ -1759,6 +1759,7 @@ int InitPlatform(void)
|
|||
// Initialize storage system
|
||||
//----------------------------------------------------------------------------
|
||||
CORE.Storage.basePath = GetWorkingDirectory();
|
||||
strncpy(CORE.Storage.mediaPath, CORE.Storage.basePath, MAX_FILEPATH_LENGTH - 1);
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#if defined(__NetBSD__)
|
||||
|
|
|
|||
|
|
@ -1394,6 +1394,7 @@ int InitPlatform(void)
|
|||
// Initialize storage system
|
||||
//----------------------------------------------------------------------------
|
||||
CORE.Storage.basePath = GetWorkingDirectory();
|
||||
strncpy(CORE.Storage.mediaPath, CORE.Storage.basePath, MAX_FILEPATH_LENGTH - 1);
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#if defined(RGFW_WAYLAND)
|
||||
|
|
|
|||
|
|
@ -2116,6 +2116,7 @@ int InitPlatform(void)
|
|||
//----------------------------------------------------------------------------
|
||||
// Define base path for storage
|
||||
CORE.Storage.basePath = SDL_GetBasePath(); // Alternative: GetWorkingDirectory();
|
||||
strncpy(CORE.Storage.mediaPath, CORE.Storage.basePath, MAX_FILEPATH_LENGTH - 1);
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#if defined(USING_VERSION_SDL3)
|
||||
|
|
|
|||
|
|
@ -1652,6 +1652,7 @@ int InitPlatform(void)
|
|||
// Initialize storage system
|
||||
//----------------------------------------------------------------------------
|
||||
CORE.Storage.basePath = GetWorkingDirectory();
|
||||
strncpy(CORE.Storage.mediaPath, CORE.Storage.basePath, MAX_FILEPATH_LENGTH - 1);
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
TRACELOG(LOG_INFO, "PLATFORM: DESKTOP: WIN32: Initialized successfully");
|
||||
|
|
|
|||
|
|
@ -1609,6 +1609,7 @@ int InitPlatform(void)
|
|||
// Initialize storage system
|
||||
//----------------------------------------------------------------------------
|
||||
CORE.Storage.basePath = GetWorkingDirectory();
|
||||
strncpy(CORE.Storage.mediaPath, CORE.Storage.basePath, MAX_FILEPATH_LENGTH - 1);
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#if defined(SUPPORT_DRM_CACHE)
|
||||
|
|
|
|||
|
|
@ -597,6 +597,7 @@ int InitPlatform(void)
|
|||
// TODO: Initialize storage system
|
||||
//----------------------------------------------------------------------------
|
||||
CORE.Storage.basePath = GetWorkingDirectory();
|
||||
strncpy(CORE.Storage.mediaPath, CORE.Storage.basePath, MAX_FILEPATH_LENGTH - 1);
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
TRACELOG(LOG_INFO, "PLATFORM: CUSTOM: Initialized successfully");
|
||||
|
|
|
|||
|
|
@ -1388,6 +1388,7 @@ int InitPlatform(void)
|
|||
// Initialize storage system
|
||||
//----------------------------------------------------------------------------
|
||||
CORE.Storage.basePath = GetWorkingDirectory();
|
||||
strncpy(CORE.Storage.mediaPath, CORE.Storage.basePath, MAX_FILEPATH_LENGTH - 1);
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
TRACELOG(LOG_INFO, "PLATFORM: WEB: Initialized successfully");
|
||||
|
|
|
|||
Loading…
Reference in a new issue