Skip to content

Commit

Permalink
correct save_file, etc file path for android
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishan09811 authored Dec 14, 2024
1 parent 00ab552 commit 3556b50
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3556b50

Please sign in to comment.