From 3556b5054ca04a6c5b886e9ccd18eb93de4930a0 Mon Sep 17 00:00:00 2001 From: Ishan09811 <156402647+Ishan09811@users.noreply.github.com> Date: Sun, 15 Dec 2024 00:53:58 +0530 Subject: [PATCH] correct save_file, etc file path for android --- src/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main.c b/src/main.c index 14b5fc8cc..3d340f425 100644 --- a/src/main.c +++ b/src/main.c @@ -1469,6 +1469,14 @@ void se_load_search_paths(){ char settings_path[SB_FILE_PATH_SIZE]; snprintf(settings_path,SB_FILE_PATH_SIZE,"%ssearch_paths.bin",se_get_pref_path()); if(!sb_load_file_data_into_buffer(settings_path,(void*)&gui_state.paths,sizeof(gui_state.paths)))memset(&gui_state.paths,0,sizeof(gui_state.paths)); + + #ifdef PLATFORM_ANDROID + const char *android_private_path = "/data/data/com.sky.SkyEmu/files/"; + snprintf(gui_state.paths.save, SB_FILE_PATH_SIZE, "%s/save/", android_private_path); + snprintf(gui_state.paths.bios, SB_FILE_PATH_SIZE, "%s/bios/", android_private_path); + snprintf(gui_state.paths.cheat_codes, SB_FILE_PATH_SIZE, "%s/cheat_codes/", android_private_path); + #endif + char * paths[]={ gui_state.paths.save, gui_state.paths.bios,