diff --git a/frontend/drivers/platform_unix.c b/frontend/drivers/platform_unix.c index ddce3cc9c0..440b336050 100644 --- a/frontend/drivers/platform_unix.c +++ b/frontend/drivers/platform_unix.c @@ -1562,8 +1562,6 @@ static void frontend_unix_get_env(int *argc, { fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_ASSETS], app_dir, "assets", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS])); - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CACHE], app_dir, - "tmp", sizeof(g_defaults.dirs[DEFAULT_DIR_CACHE])); fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SHADER], app_dir, "shaders", sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER])); fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_OVERLAY], app_dir, @@ -1628,6 +1626,10 @@ static void frontend_unix_get_env(int *argc, internal_storage_app_path, "cheats", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS])); + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CACHE], + internal_storage_app_path, "temp", + sizeof(g_defaults.dirs[DEFAULT_DIR_CACHE])); + if(!string_is_empty(screenshot_dir) && test_permissions(screenshot_dir)) { @@ -1686,6 +1688,10 @@ static void frontend_unix_get_env(int *argc, app_dir, "cheats", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS])); + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CACHE], + app_dir, "temp", + sizeof(g_defaults.dirs[DEFAULT_DIR_CACHE])); + if( !string_is_empty(screenshot_dir) && test_permissions(screenshot_dir)) { @@ -1749,6 +1755,10 @@ static void frontend_unix_get_env(int *argc, fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CHEATS], internal_storage_path, "RetroArch/cheats", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS])); + + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CACHE], + internal_storage_path, "temp", + sizeof(g_defaults.dirs[DEFAULT_DIR_CACHE])); default: break; } diff --git a/runahead/secondary_core.c b/runahead/secondary_core.c index 801d2e491e..02d708e736 100644 --- a/runahead/secondary_core.c +++ b/runahead/secondary_core.c @@ -18,6 +18,7 @@ #include "mem_util.h" #include "../core.h" +#include "../configuration.h" #include "../dynamic.h" #include "../paths.h" #include "../content.h" @@ -50,6 +51,7 @@ void clear_controller_port_map(void); static char *get_temp_directory_alloc(void) { + settings_t *settings = config_get_ptr(); char *path = NULL; #ifdef _WIN32 #ifdef LEGACY_WIN32 @@ -67,6 +69,8 @@ static char *get_temp_directory_alloc(void) path = utf16_to_utf8_string_alloc(wideStr); free(wideStr); #endif +#elif defined ANDROID + path = strcpy_alloc_force(settings->paths.directory_libretro); #else path = "/tmp"; if (getenv("TMPDIR"))