mirror of
https://github.com/libretro/RetroArch
synced 2024-12-28 09:29:16 +00:00
add default menu content
This commit is contained in:
parent
9cfb6c971f
commit
be6ddfa6d0
@ -930,6 +930,10 @@ static void config_set_defaults(void)
|
||||
strlcpy(settings->directory.menu_config,
|
||||
g_defaults.dir.menu_config,
|
||||
sizeof(settings->directory.menu_config));
|
||||
if (!string_is_empty(g_defaults.dir.menu_content))
|
||||
strlcpy(settings->directory.menu_content,
|
||||
g_defaults.dir.menu_content,
|
||||
sizeof(settings->directory.menu_content));
|
||||
#endif
|
||||
if (!string_is_empty(g_defaults.dir.autoconfig))
|
||||
strlcpy(settings->directory.autoconfig,
|
||||
|
@ -52,6 +52,7 @@ struct defaults
|
||||
|
||||
struct
|
||||
{
|
||||
char menu_content[PATH_MAX_LENGTH];
|
||||
char core_assets[PATH_MAX_LENGTH];
|
||||
char menu_config[PATH_MAX_LENGTH];
|
||||
char autoconfig[PATH_MAX_LENGTH];
|
||||
|
@ -95,22 +95,6 @@ static void frontend_emscripten_get_env(int *argc, char *argv[],
|
||||
fill_pathname_join(g_defaults.dir.autoconfig, base_path,
|
||||
"autoconfig", sizeof(g_defaults.dir.autoconfig));
|
||||
|
||||
if (path_is_directory("/usr/local/share/retroarch/assets"))
|
||||
fill_pathname_join(g_defaults.dir.assets, "/usr/local/share/retroarch",
|
||||
"assets", sizeof(g_defaults.dir.assets));
|
||||
else if (path_is_directory("/usr/share/retroarch/assets"))
|
||||
fill_pathname_join(g_defaults.dir.assets, "/usr/share/retroarch",
|
||||
"assets", sizeof(g_defaults.dir.assets));
|
||||
else if (path_is_directory("/usr/local/share/games/retroarch/assets"))
|
||||
fill_pathname_join(g_defaults.dir.assets, "/usr/local/share/games/retroarch",
|
||||
"assets", sizeof(g_defaults.dir.assets));
|
||||
else if (path_is_directory("/usr/share/games/retroarch/assets"))
|
||||
fill_pathname_join(g_defaults.dir.assets, "/usr/share/games/retroarch",
|
||||
"assets", sizeof(g_defaults.dir.assets));
|
||||
else
|
||||
fill_pathname_join(g_defaults.dir.assets, base_path,
|
||||
"assets", sizeof(g_defaults.dir.assets));
|
||||
|
||||
fill_pathname_join(g_defaults.dir.menu_config, base_path,
|
||||
"config", sizeof(g_defaults.dir.menu_config));
|
||||
fill_pathname_join(g_defaults.dir.remap, g_defaults.dir.menu_config,
|
||||
@ -135,6 +119,10 @@ static void frontend_emscripten_get_env(int *argc, char *argv[],
|
||||
"screenshots", sizeof(g_defaults.dir.screenshot));
|
||||
fill_pathname_join(g_defaults.dir.thumbnails, base_path,
|
||||
"thumbnails", sizeof(g_defaults.dir.thumbnails));
|
||||
fill_pathname_join(g_defaults.dir.thumbnails, "/",
|
||||
"content", sizeof(g_defaults.dir.thumbnails));
|
||||
fill_pathname_join(g_defaults.dir.assets, "/",
|
||||
"assets", sizeof(g_defaults.dir.assets));
|
||||
|
||||
snprintf(g_defaults.settings.menu, sizeof(g_defaults.settings.menu), "rgui");
|
||||
}
|
||||
|
@ -120,6 +120,8 @@ function setupFolderStructure()
|
||||
FS.createPath('/', '/home/web_user', true, true);
|
||||
FS.createPath('/', '/home/web_user/.config', true, true);
|
||||
FS.createPath('/', '/home/web_user/.config/retroarch', true, true);
|
||||
FS.createPath('/', '/assets', true, true);
|
||||
FS.createPath('/', '/content', true, true);
|
||||
}
|
||||
|
||||
function stat(path)
|
||||
@ -171,7 +173,7 @@ function uploadData(data,name)
|
||||
FS.createDataFile('/', name, dataView, true, false);
|
||||
|
||||
var data = FS.readFile(name,{ encoding: 'binary' });
|
||||
FS.writeFile('/home/web_user/content/' + name, data ,{ encoding: 'binary' });
|
||||
FS.writeFile('/content/' + name, data ,{ encoding: 'binary' });
|
||||
FS.unlink(name);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user