mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-15 14:59:37 +00:00
Hide away g_settings.libretro mutation and do calls to environment
callback action instead - frontends should do it this way as well
This commit is contained in:
parent
b26fcfb4a6
commit
8aef9f4c64
@ -1222,8 +1222,11 @@ HRESULT CRetroArchCoreBrowser::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandle
|
||||
wcstombs(str_buffer, (const wchar_t *)XuiListGetText(m_menulist, index), sizeof(str_buffer));
|
||||
if(path_file_exists(rgui->browser->list->elems[index].data))
|
||||
{
|
||||
snprintf(g_settings.libretro, sizeof(g_settings.libretro), "%s\\%s",
|
||||
rgui->browser->current_dir.directory_path, str_buffer);
|
||||
struct retro_variable var;
|
||||
var.key = "core_path";
|
||||
snprintf(var.value, sizeof(var.value), "%s\\%s", rgui->browser->current_dir.directory_path, str_buffer);
|
||||
rarch_environment_cb(RETRO_ENVIRONMENT_SET_LIBRETRO_PATH, &var);
|
||||
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_EXITSPAWN);
|
||||
process_input_ret = -1;
|
||||
}
|
||||
|
@ -367,7 +367,12 @@ static int system_process_args(int argc, char *argv[], void *args)
|
||||
// a big hack: sometimes salamander doesn't save the new core it loads on first boot,
|
||||
// so we make sure g_settings.libretro is set here
|
||||
if (!g_settings.libretro[0] && argc >= 1 && strrchr(argv[0], '/'))
|
||||
strlcpy(g_settings.libretro, strrchr(argv[0], '/') + 1, sizeof(g_settings.libretro));
|
||||
{
|
||||
struct retro_variable var;
|
||||
var.key = "core_path";
|
||||
strlcpy(var.value, strrchr(argv[0], '/') + 1, sizeof(var.value));
|
||||
rarch_environment_cb(RETRO_ENVIRONMENT_SET_LIBRETRO_PATH, &var);
|
||||
}
|
||||
|
||||
if (argc > 2 && argv[1] != NULL && argv[2] != NULL)
|
||||
{
|
||||
|
@ -28,7 +28,12 @@ static void get_environment_settings(int argc, char *argv[], void *args)
|
||||
|
||||
/* FIXME - should this apply for both BB10 and PB? */
|
||||
#if defined(__QNX__) && !defined(HAVE_BB10)
|
||||
strlcpy(g_settings.libretro, "app/native/lib", sizeof(g_settings.libretro));
|
||||
struct retro_variable var;
|
||||
|
||||
var.key = "core_path";
|
||||
strlcpy(var.value, "app/native/lib", sizeof(var.value));
|
||||
rarch_environment_cb(RETRO_ENVIRONMENT_SET_LIBRETRO_PATH, &var);
|
||||
|
||||
strlcpy(g_extern.config_path, "app/native/retroarch.cfg", sizeof(g_extern.config_path));
|
||||
strlcpy(g_settings.video.shader_dir, "app/native/shaders_glsl", sizeof(g_settings.video.shader_dir));
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user