This commit is contained in:
twinaphex 2015-03-20 21:22:38 +01:00
parent 3a0f9599b1
commit e996d5d51f
19 changed files with 393 additions and 291 deletions

View File

@ -55,6 +55,7 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
WPARAM mode = wparam & 0xffff;
unsigned cmd = RARCH_CMD_NONE;
bool do_wm_close = false;
settings_t *settings = config_get_ptr();
switch (mode)
{
@ -70,13 +71,13 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
{
extensions = "All Files\0*.*\0 Libretro core(.dll)\0*.dll\0";
title = "Load Core";
initial_dir = g_settings.libretro_directory;
initial_dir = settings->libretro_directory;
}
else if (mode == ID_M_LOAD_CONTENT)
{
extensions = "All Files\0*.*\0\0";
title = "Load Content";
initial_dir = g_settings.menu_content_directory;
initial_dir = settings->menu_content_directory;
}
if (win32_browser(owner, win32_file, extensions, title, initial_dir))
@ -84,7 +85,7 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
switch (mode)
{
case ID_M_LOAD_CORE:
strlcpy(g_settings.libretro, win32_file, sizeof(g_settings.libretro));
strlcpy(settings->libretro, win32_file, sizeof(settings->libretro));
cmd = RARCH_CMD_LOAD_CORE;
break;
case ID_M_LOAD_CONTENT:
@ -145,12 +146,12 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
else if (mode == ID_M_STATE_INDEX_AUTO)
{
signed idx = -1;
g_settings.state_slot = idx;
settings->state_slot = idx;
}
else if (mode >= (ID_M_STATE_INDEX_AUTO+1) && mode <= (ID_M_STATE_INDEX_AUTO+10))
{
signed idx = (mode - (ID_M_STATE_INDEX_AUTO+1));
g_settings.state_slot = idx;
settings->state_slot = idx;
}
break;
}

View File

@ -25,24 +25,25 @@ void video_monitor_adjust_system_rates(void)
float timing_skew;
const struct retro_system_timing *info =
(const struct retro_system_timing*)&g_extern.system.av_info.timing;
settings_t *settings = config_get_ptr();
g_extern.system.force_nonblock = false;
if (info->fps <= 0.0)
return;
timing_skew = fabs(1.0f - info->fps / g_settings.video.refresh_rate);
timing_skew = fabs(1.0f - info->fps / settings->video.refresh_rate);
/* We don't want to adjust pitch too much. If we have extreme cases,
* just don't readjust at all. */
if (timing_skew <= g_settings.audio.max_timing_skew)
if (timing_skew <= settings->audio.max_timing_skew)
return;
RARCH_LOG("Timings deviate too much. Will not adjust. (Display = %.2f Hz, Game = %.2f Hz)\n",
g_settings.video.refresh_rate,
settings->video.refresh_rate,
(float)info->fps);
if (info->fps <= g_settings.video.refresh_rate)
if (info->fps <= settings->video.refresh_rate)
return;
/* We won't be able to do VSync reliably when game FPS > monitor FPS. */
@ -59,11 +60,13 @@ void video_monitor_adjust_system_rates(void)
void video_monitor_set_refresh_rate(float hz)
{
char msg[PATH_MAX_LENGTH];
settings_t *settings = config_get_ptr();
snprintf(msg, sizeof(msg), "Setting refresh rate to: %.3f Hz.", hz);
rarch_main_msg_queue_push(msg, 1, 180, false);
RARCH_LOG("%s\n", msg);
g_settings.video.refresh_rate = hz;
settings->video.refresh_rate = hz;
}
/**
@ -75,9 +78,10 @@ void video_monitor_compute_fps_statistics(void)
{
double avg_fps = 0.0, stddev = 0.0;
unsigned samples = 0;
runloop_t *runloop = rarch_main_get_ptr();
runloop_t *runloop = rarch_main_get_ptr();
settings_t *settings = config_get_ptr();
if (g_settings.video.threaded)
if (settings->video.threaded)
{
RARCH_LOG("Monitor FPS estimation is disabled for threaded video.\n");
return;
@ -118,14 +122,15 @@ bool video_monitor_fps_statistics(double *refresh_rate,
double *deviation, unsigned *sample_points)
{
unsigned i;
retro_time_t accum = 0, avg, accum_var = 0;
unsigned samples = 0;
runloop_t *runloop = rarch_main_get_ptr();
retro_time_t accum = 0, avg, accum_var = 0;
unsigned samples = 0;
runloop_t *runloop = rarch_main_get_ptr();
settings_t *settings = config_get_ptr();
samples = min(MEASURE_FRAME_TIME_SAMPLES_COUNT,
runloop->measure_data.frame_time_samples_count);
if (g_settings.video.threaded || (samples < 2))
if (settings->video.threaded || (samples < 2))
return false;
/* Measure statistics on frame time (microsecs), *not* FPS. */

View File

@ -259,6 +259,7 @@ static void state_tracker_update_input(state_tracker_t *tracker)
{
unsigned i;
uint16_t state[2] = {0};
settings_t *settings = config_get_ptr();
static const unsigned buttons[] = {
RETRO_DEVICE_ID_JOYPAD_R,
@ -286,11 +287,11 @@ static void state_tracker_update_input(state_tracker_t *tracker)
return;
for (i = 0; i < 2; i++)
input_push_analog_dpad(g_settings.input.binds[i],
g_settings.input.analog_dpad_mode[i]);
input_push_analog_dpad(settings->input.binds[i],
settings->input.analog_dpad_mode[i]);
for (i = 0; i < MAX_USERS; i++)
input_push_analog_dpad(g_settings.input.autoconf_binds[i],
g_settings.input.analog_dpad_mode[i]);
input_push_analog_dpad(settings->input.autoconf_binds[i],
settings->input.analog_dpad_mode[i]);
if (!driver->block_libretro_input)
{
@ -306,9 +307,9 @@ static void state_tracker_update_input(state_tracker_t *tracker)
}
for (i = 0; i < 2; i++)
input_pop_analog_dpad(g_settings.input.binds[i]);
input_pop_analog_dpad(settings->input.binds[i]);
for (i = 0; i < MAX_USERS; i++)
input_pop_analog_dpad(g_settings.input.autoconf_binds[i]);
input_pop_analog_dpad(settings->input.autoconf_binds[i]);
for (i = 0; i < 2; i++)
tracker->input_state[i] = state[i];

View File

@ -83,7 +83,9 @@ unsigned video_texture_load(void *data,
enum texture_backend_type type,
enum texture_filter_type filter_type)
{
if (g_settings.video.threaded
settings_t *settings = config_get_ptr();
if (settings->video.threaded
&& !g_extern.system.hw_render_callback.context_type)
{
driver_t *driver = driver_get_ptr();

View File

@ -47,6 +47,7 @@ static bool input_try_autoconfigure_joypad_from_conf(config_file_t *conf,
int input_vid = 0, input_pid = 0;
bool cond_found_idx, cond_found_general,
cond_found_vid = false, cond_found_pid = false;
settings_t *settings = config_get_ptr();
if (!conf)
return false;
@ -85,8 +86,8 @@ static bool input_try_autoconfigure_joypad_from_conf(config_file_t *conf,
return false;
found:
g_settings.input.autoconfigured[idx] = true;
input_autoconfigure_joypad_conf(conf, g_settings.input.autoconf_binds[idx]);
settings->input.autoconfigured[idx] = true;
input_autoconfigure_joypad_conf(conf, settings->input.autoconf_binds[idx]);
snprintf(msg, sizeof(msg), "Joypad port #%u (%s) configured.",
idx, name);
@ -105,29 +106,30 @@ void input_config_autoconfigure_joypad(unsigned idx,
size_t i;
bool internal_only, block_osd_spam;
struct string_list *list = NULL;
settings_t *settings = config_get_ptr();
if (!g_settings.input.autodetect_enable)
if (!settings->input.autodetect_enable)
return;
/* This will be the case if input driver is reinit.
* No reason to spam autoconfigure messages
* every time (fine in log). */
block_osd_spam = g_settings.input.autoconfigured[idx] && name;
block_osd_spam = settings->input.autoconfigured[idx] && name;
for (i = 0; i < RARCH_BIND_LIST_END; i++)
{
g_settings.input.autoconf_binds[idx][i].joykey = NO_BTN;
g_settings.input.autoconf_binds[idx][i].joyaxis = AXIS_NONE;
g_settings.input.autoconf_binds[idx][i].joykey_label[0] = '\0';
g_settings.input.autoconf_binds[idx][i].joyaxis_label[0] = '\0';
settings->input.autoconf_binds[idx][i].joykey = NO_BTN;
settings->input.autoconf_binds[idx][i].joyaxis = AXIS_NONE;
settings->input.autoconf_binds[idx][i].joykey_label[0] = '\0';
settings->input.autoconf_binds[idx][i].joyaxis_label[0] = '\0';
}
g_settings.input.autoconfigured[idx] = false;
settings->input.autoconfigured[idx] = false;
if (!name)
return;
/* if false, load from both cfg files and internal */
internal_only = !*g_settings.input.autoconfig_dir;
internal_only = !*settings->input.autoconfig_dir;
#if defined(HAVE_BUILTIN_AUTOCONFIG)
/* First internal */
@ -148,7 +150,7 @@ void input_config_autoconfigure_joypad(unsigned idx,
return;
/* Now try files */
list = dir_list_new(g_settings.input.autoconfig_dir, "cfg", false);
list = dir_list_new(settings->input.autoconfig_dir, "cfg", false);
if (!list)
return;
@ -172,9 +174,10 @@ void input_config_autoconfigure_joypad(unsigned idx,
const struct retro_keybind *input_get_auto_bind(unsigned port, unsigned id)
{
unsigned joy_idx = g_settings.input.joypad_map[port];
settings_t *settings = config_get_ptr();
unsigned joy_idx = settings->input.joypad_map[port];
if (joy_idx < MAX_USERS)
return &g_settings.input.autoconf_binds[joy_idx][id];
return &settings->input.autoconf_binds[joy_idx][id];
return NULL;
}

View File

@ -329,6 +329,8 @@ void input_config_parse_joy_axis(config_file_t *conf, const char *prefix,
static void input_get_bind_string_joykey(char *buf, const char *prefix,
const struct retro_keybind *bind, size_t size)
{
settings_t *settings = config_get_ptr();
if (GET_HAT_DIR(bind->joykey))
{
const char *dir;
@ -352,7 +354,7 @@ static void input_get_bind_string_joykey(char *buf, const char *prefix,
break;
}
if (bind->joykey_label[0] != '\0' && g_settings.input.autoconfig_descriptor_label_show)
if (bind->joykey_label[0] != '\0' && settings->input.autoconfig_descriptor_label_show)
snprintf(buf, size, "%s %s ", prefix, bind->joykey_label);
else
snprintf(buf, size, "%sHat #%u %s ", prefix,
@ -360,7 +362,7 @@ static void input_get_bind_string_joykey(char *buf, const char *prefix,
}
else
{
if (bind->joykey_label[0] != '\0' && g_settings.input.autoconfig_descriptor_label_show)
if (bind->joykey_label[0] != '\0' && settings->input.autoconfig_descriptor_label_show)
snprintf(buf, size, "%s%s (btn) ", prefix, bind->joykey_label);
else
snprintf(buf, size, "%s%u (btn) ", prefix, (unsigned)bind->joykey);
@ -372,6 +374,7 @@ static void input_get_bind_string_joyaxis(char *buf, const char *prefix,
{
unsigned axis = 0;
char dir = '\0';
settings_t *settings = config_get_ptr();
if (AXIS_NEG_GET(bind->joyaxis) != AXIS_DIR_NONE)
{
@ -383,7 +386,7 @@ static void input_get_bind_string_joyaxis(char *buf, const char *prefix,
dir = '+';
axis = AXIS_POS_GET(bind->joyaxis);
}
if (bind->joyaxis_label[0] != '\0' && g_settings.input.autoconfig_descriptor_label_show)
if (bind->joyaxis_label[0] != '\0' && settings->input.autoconfig_descriptor_label_show)
snprintf(buf, size, "%s%s (axis) ", prefix, bind->joyaxis_label);
else
snprintf(buf, size, "%s%c%u (axis) ", prefix, dir, axis);

View File

@ -145,8 +145,9 @@ const char* config_get_input_driver_options(void)
void find_input_driver(void)
{
int i = find_driver_index("input_driver", g_settings.input.driver);
driver_t *driver = driver_get_ptr();
settings_t *settings = config_get_ptr();
int i = find_driver_index("input_driver", settings->input.driver);
if (i >= 0)
driver->input = (const input_driver_t*)input_driver_find_handle(i);
@ -154,7 +155,7 @@ void find_input_driver(void)
{
unsigned d;
RARCH_ERR("Couldn't find any input driver named \"%s\"\n",
g_settings.input.driver);
settings->input.driver);
RARCH_LOG_OUTPUT("Available input drivers are:\n");
for (d = 0; input_driver_find_handle(d); d++)
RARCH_LOG_OUTPUT("\t%s\n", input_driver_find_ident(d));

View File

@ -55,7 +55,8 @@ const char *input_joypad_name(const rarch_joypad_driver_t *drv,
bool input_joypad_set_rumble(const rarch_joypad_driver_t *drv,
unsigned port, enum retro_rumble_effect effect, uint16_t strength)
{
unsigned joy_idx = g_settings.input.joypad_map[port];
settings_t *settings = config_get_ptr();
unsigned joy_idx = settings->input.joypad_map[port];
if (!drv || !drv->set_rumble)
return false;
@ -90,7 +91,8 @@ bool input_joypad_pressed(
uint32_t joyaxis;
uint64_t joykey;
const struct retro_keybind *auto_binds = NULL;
unsigned joy_idx = g_settings.input.joypad_map[port];
settings_t *settings = config_get_ptr();
unsigned joy_idx = settings->input.joypad_map[port];
if (joy_idx >= MAX_USERS)
return false;
@ -98,7 +100,7 @@ bool input_joypad_pressed(
return false;
/* Auto-binds are per joypad, not per user. */
auto_binds = g_settings.input.autoconf_binds[joy_idx];
auto_binds = settings->input.autoconf_binds[joy_idx];
joykey = binds[key].joykey;
if (joykey == NO_BTN)
@ -113,7 +115,7 @@ bool input_joypad_pressed(
axis = drv->axis(joy_idx, joyaxis);
scaled_axis = (float)abs(axis) / 0x8000;
return scaled_axis > g_settings.input.axis_threshold;
return scaled_axis > settings->input.axis_threshold;
}
/**
@ -147,7 +149,8 @@ int16_t input_joypad_analog(const rarch_joypad_driver_t *drv,
const struct retro_keybind *auto_binds = NULL;
const struct retro_keybind *bind_minus = NULL;
const struct retro_keybind *bind_plus = NULL;
unsigned joy_idx = g_settings.input.joypad_map[port];
settings_t *settings = config_get_ptr();
unsigned joy_idx = settings->input.joypad_map[port];
if (!drv)
return 0;
@ -156,7 +159,7 @@ int16_t input_joypad_analog(const rarch_joypad_driver_t *drv,
return 0;
/* Auto-binds are per joypad, not per user. */
auto_binds = g_settings.input.autoconf_binds[joy_idx];
auto_binds = settings->input.autoconf_binds[joy_idx];
input_conv_analog_id_to_bind_id(idx, ident, &ident_minus, &ident_plus);

View File

@ -31,13 +31,14 @@
bool input_remapping_load_file(const char *path)
{
unsigned i, j;
config_file_t *conf = config_file_new(path);
config_file_t *conf = config_file_new(path);
settings_t *settings = config_get_ptr();
if (!conf)
return false;
strlcpy(g_settings.input.remapping_path, path,
sizeof(g_settings.input.remapping_path));
strlcpy(settings->input.remapping_path, path,
sizeof(settings->input.remapping_path));
for (i = 0; i < MAX_USERS; i++)
{
@ -54,7 +55,7 @@ bool input_remapping_load_file(const char *path)
snprintf(key_ident[j], sizeof(key_ident[j]), "%s_%s", buf, key_strings[j]);
if (config_get_int(conf, key_ident[j], &key_remap))
g_settings.input.remap_ids[i][j] = key_remap;
settings->input.remap_ids[i][j] = key_remap;
}
}
@ -75,8 +76,9 @@ void input_remapping_save_file(const char *path)
char buf[PATH_MAX_LENGTH];
char remap_file[PATH_MAX_LENGTH];
config_file_t *conf = NULL;
settings_t *settings = config_get_ptr();
fill_pathname_join(buf, g_settings.input_remapping_directory,
fill_pathname_join(buf, settings->input_remapping_directory,
path, sizeof(buf));
fill_pathname_noext(remap_file, buf, ".rmp", sizeof(remap_file));
@ -89,7 +91,7 @@ void input_remapping_save_file(const char *path)
if (!conf)
return;
for (i = 0; i < g_settings.input.max_users; i++)
for (i = 0; i < settings->input.max_users; i++)
{
char key_ident[RARCH_FIRST_META_KEY][128];
char key_strings[RARCH_FIRST_META_KEY][128] = { "b", "y", "select", "start",
@ -100,7 +102,7 @@ void input_remapping_save_file(const char *path)
for (j = 0; j < RARCH_FIRST_META_KEY; j++)
{
snprintf(key_ident[j], sizeof(key_ident[j]), "%s_%s", buf, key_strings[j]);
config_set_int(conf, key_ident[j], g_settings.input.remap_ids[i][j]);
config_set_int(conf, key_ident[j], settings->input.remap_ids[i][j]);
}
}
@ -111,10 +113,11 @@ void input_remapping_save_file(const char *path)
void input_remapping_set_defaults(void)
{
unsigned i, j;
settings_t *settings = config_get_ptr();
for (i = 0; i < MAX_USERS; i++)
{
for (j = 0; j < RARCH_BIND_LIST_END; j++)
g_settings.input.remap_ids[i][j] = g_settings.input.binds[i][j].id;
settings->input.remap_ids[i][j] = settings->input.binds[i][j].id;
}
}

View File

@ -94,11 +94,12 @@ int cb_core_updater_download(void *data_, size_t len)
const char* file_ext = NULL;
char output_path[PATH_MAX_LENGTH], msg[PATH_MAX_LENGTH];
char *data = (char*)data_;
settings_t *settings = config_get_ptr();
if (!data)
return -1;
fill_pathname_join(output_path, g_settings.libretro_directory,
fill_pathname_join(output_path, settings->libretro_directory,
core_updater_path, sizeof(output_path));
f = fopen(output_path, "wb");
@ -117,14 +118,14 @@ int cb_core_updater_download(void *data_, size_t len)
#ifdef HAVE_ZLIB
file_ext = path_get_extension(output_path);
if (!g_settings.network.buildbot_auto_extract_archive)
if (!settings->network.buildbot_auto_extract_archive)
return 0;
if (!strcasecmp(file_ext,"zip"))
{
if (!zlib_parse_file(output_path, NULL, zlib_extract_core_callback,
(void*)g_settings.libretro_directory))
(void*)settings->libretro_directory))
RARCH_LOG("Could not process ZIP file.\n");
}
#endif

View File

@ -131,7 +131,8 @@ static int deferred_push_core_information(void *data, void *userdata,
core_info_t *info = NULL;
file_list_t *list = (file_list_t*)data;
file_list_t *menu_list = (file_list_t*)userdata;
driver_t *driver = driver_get_ptr();
driver_t *driver = driver_get_ptr();
settings_t *settings = config_get_ptr();
if (!list || !menu_list)
return -1;
@ -218,7 +219,7 @@ static int deferred_push_core_information(void *data, void *userdata,
{
core_info_list_update_missing_firmware(
g_extern.core_info, info->path,
g_settings.system_directory);
settings->system_directory);
menu_list_push(list, "Firmware: ", "",
MENU_SETTINGS_CORE_INFO_NONE, 0);
@ -278,11 +279,12 @@ static int deferred_push_rdb_entry_detail(void *data, void *userdata,
char path_rdl[PATH_MAX_LENGTH], path_base[PATH_MAX_LENGTH];
unsigned i, j;
database_info_list_t *db_info = NULL;
file_list_t *list = NULL;
file_list_t *menu_list = NULL;
struct string_list *str_list = NULL;
menu_handle_t *menu = menu_driver_resolve();
driver_t *driver = driver_get_ptr();
file_list_t *list = NULL;
file_list_t *menu_list = NULL;
struct string_list *str_list = NULL;
menu_handle_t *menu = menu_driver_resolve();
driver_t *driver = driver_get_ptr();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
@ -315,7 +317,7 @@ static int deferred_push_rdb_entry_detail(void *data, void *userdata,
path_remove_extension(path_base);
strlcat(path_base, ".rdl", sizeof(path_base));
fill_pathname_join(path_rdl, g_settings.content_database, path_base,
fill_pathname_join(path_rdl, settings->content_database, path_base,
sizeof(path_rdl));
menu_database_realloc(path_rdl, false);
@ -624,6 +626,7 @@ static int deferred_push_cursor_manager_list_deferred(void *data, void *userdata
file_list_t *list = NULL;
file_list_t *menu_list = NULL;
menu_handle_t *menu = menu_driver_resolve();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
@ -646,7 +649,7 @@ static int deferred_push_cursor_manager_list_deferred(void *data, void *userdata
if (!config_get_string(conf, "rdb", &rdb))
return -1;
fill_pathname_join(rdb_path, g_settings.content_database,
fill_pathname_join(rdb_path, settings->content_database,
rdb, sizeof(rdb_path));
menu_database_populate_query(list, rdb_path, query);
@ -861,7 +864,7 @@ static int deferred_push_core_information(void *data, void *userdata,
{
core_info_list_update_missing_firmware(
g_extern.core_info, info->path,
g_settings.system_directory);
settings->system_directory);
menu_list_push(list, "Firmware: ", "",
MENU_SETTINGS_CORE_INFO_NONE, 0);
@ -995,10 +998,11 @@ static int deferred_push_settings(void *data, void *userdata,
const char *path, const char *label, unsigned type)
{
rarch_setting_t *setting = NULL;
file_list_t *list = NULL;
file_list_t *menu_list = NULL;
menu_handle_t *menu = menu_driver_resolve();
driver_t *driver = driver_get_ptr();
file_list_t *list = NULL;
file_list_t *menu_list = NULL;
menu_handle_t *menu = menu_driver_resolve();
driver_t *driver = driver_get_ptr();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
@ -1016,7 +1020,7 @@ static int deferred_push_settings(void *data, void *userdata,
menu_list_clear(list);
if (g_settings.menu.collapse_subgroups_enable)
if (settings->menu.collapse_subgroups_enable)
{
for (; setting->type != ST_NONE; setting++)
{
@ -1417,7 +1421,8 @@ static int deferred_push_core_input_remapping_options(void *data, void *userdata
{
unsigned p, retro_id;
file_list_t *list = (file_list_t*)data;
driver_t *driver = driver_get_ptr();
driver_t *driver = driver_get_ptr();
settings_t *settings = config_get_ptr();
(void)userdata;
(void)type;
@ -1431,7 +1436,7 @@ static int deferred_push_core_input_remapping_options(void *data, void *userdata
menu_list_push(list, "Remap File Save As",
"remap_file_save_as", MENU_SETTING_ACTION, 0);
for (p = 0; p < g_settings.input.max_users; p++)
for (p = 0; p < settings->input.max_users; p++)
{
for (retro_id = 0; retro_id < RARCH_FIRST_CUSTOM_BIND; retro_id++)
{
@ -1701,14 +1706,16 @@ int deferred_push_content_list(void *data, void *userdata,
static int deferred_push_database_manager_list(void *data, void *userdata,
const char *path, const char *label, unsigned type)
{
return menu_entries_parse_list((file_list_t*)data, (file_list_t*)userdata, g_settings.content_database, label, type,
settings_t *settings = config_get_ptr();
return menu_entries_parse_list((file_list_t*)data, (file_list_t*)userdata, settings->content_database, label, type,
MENU_FILE_RDB, "rdb", NULL);
}
static int deferred_push_cursor_manager_list(void *data, void *userdata,
const char *path, const char *label, unsigned type)
{
return menu_entries_parse_list((file_list_t*)data, (file_list_t*)userdata, g_settings.cursor_directory, label, type,
settings_t *settings = config_get_ptr();
return menu_entries_parse_list((file_list_t*)data, (file_list_t*)userdata, settings->cursor_directory, label, type,
MENU_FILE_CURSOR, "dbc", NULL);
}
@ -1849,6 +1856,8 @@ void menu_entries_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx,
const char *elem0, const char *elem1)
{
settings_t *settings = config_get_ptr();
if (!cbs)
return;
@ -1858,7 +1867,7 @@ void menu_entries_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
{
if (menu_entries_common_is_settings_entry(elem0))
{
if (!g_settings.menu.collapse_subgroups_enable)
if (!settings->menu.collapse_subgroups_enable)
{
cbs->action_deferred_push = deferred_push_settings_subgroup;
return;

View File

@ -68,8 +68,9 @@ static int archive_load(void)
const char *menu_path = NULL;
const char *menu_label = NULL;
const char* path = NULL;
unsigned int type = 0;
menu_handle_t *menu = menu_driver_resolve();
unsigned int type = 0;
menu_handle_t *menu = menu_driver_resolve();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
@ -97,7 +98,7 @@ static int archive_load(void)
case 0:
menu_list_push_stack_refresh(
menu->menu_list,
g_settings.libretro_directory,
settings->libretro_directory,
"deferred_core_list",
0,
menu->navigation.selection_ptr);
@ -159,10 +160,12 @@ static int mouse_post_iterate(menu_file_list_cbs_t *cbs, const char *path,
const char *label, unsigned type, unsigned action)
{
menu_handle_t *menu = menu_driver_resolve();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
if (!g_settings.menu.mouse.enable)
if (!settings->menu.mouse.enable)
{
menu->mouse.wheeldown = false;
menu->mouse.wheelup = false;
@ -242,7 +245,8 @@ static int action_iterate_help(const char *label, unsigned action)
char desc[ARRAY_SIZE(binds)][64];
char msg[PATH_MAX_LENGTH];
menu_handle_t *menu = menu_driver_resolve();
driver_t *driver = driver_get_ptr();
driver_t *driver = driver_get_ptr();
settings_t *settings = config_get_ptr();
if (!menu)
return 0;
@ -253,7 +257,7 @@ static int action_iterate_help(const char *label, unsigned action)
for (i = 0; i < ARRAY_SIZE(binds); i++)
{
const struct retro_keybind *keybind = (const struct retro_keybind*)
&g_settings.input.binds[0][binds[i]];
&settings->input.binds[0][binds[i]];
const struct retro_keybind *auto_bind = (const struct retro_keybind*)
input_get_auto_bind(0, binds[i]);
@ -352,7 +356,9 @@ static int action_iterate_info(const char *label, unsigned action)
static int action_iterate_load_open_zip(const char *label, unsigned action)
{
switch (g_settings.archive.mode)
settings_t *settings = config_get_ptr();
switch (settings->archive.mode)
{
case 0:
return load_or_open_zip_iterate(action);
@ -377,6 +383,8 @@ static int action_iterate_menu_viewport(const char *label, unsigned action)
video_viewport_t *custom = &g_extern.console.screen.viewports.custom_vp;
menu_handle_t *menu = menu_driver_resolve();
driver_t *driver = driver_get_ptr();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
@ -384,7 +392,7 @@ static int action_iterate_menu_viewport(const char *label, unsigned action)
geom = (struct retro_game_geometry*)&g_extern.system.av_info.geometry;
if (g_settings.video.scale_integer)
if (settings->video.scale_integer)
{
stride_x = geom->base_width;
stride_y = geom->base_height;
@ -457,7 +465,7 @@ static int action_iterate_menu_viewport(const char *label, unsigned action)
menu_list_pop_stack(menu->menu_list);
if (type == MENU_SETTINGS_CUSTOM_VIEWPORT
&& !g_settings.video.scale_integer)
&& !settings->video.scale_integer)
{
menu_list_push_stack(menu->menu_list, "",
"custom_viewport_2", 0, menu->navigation.selection_ptr);
@ -465,7 +473,7 @@ static int action_iterate_menu_viewport(const char *label, unsigned action)
break;
case MENU_ACTION_START:
if (!g_settings.video.scale_integer)
if (!settings->video.scale_integer)
{
video_viewport_t vp;
@ -503,7 +511,7 @@ static int action_iterate_menu_viewport(const char *label, unsigned action)
if (driver->video_data && driver->menu_ctx && driver->menu_ctx->render)
driver->menu_ctx->render();
if (g_settings.video.scale_integer)
if (settings->video.scale_integer)
{
custom->x = 0;
custom->y = 0;
@ -591,10 +599,12 @@ static int mouse_iterate(unsigned *action)
menu_handle_t *menu = menu_driver_resolve();
runloop_t *runloop = rarch_main_get_ptr();
driver_t *driver = driver_get_ptr();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
if (!g_settings.menu.mouse.enable)
if (!settings->menu.mouse.enable)
{
menu->mouse.left = 0;
menu->mouse.right = 0;

View File

@ -118,14 +118,15 @@ extern size_t hack_shader_pass;
static int action_ok_shader_pass(const char *path,
const char *label, unsigned type, size_t idx)
{
hack_shader_pass = type - MENU_SETTINGS_SHADER_PASS_0;
menu_handle_t *menu = menu_driver_resolve();
hack_shader_pass = type - MENU_SETTINGS_SHADER_PASS_0;
menu_handle_t *menu = menu_driver_resolve();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
return menu_list_push_stack_refresh(
menu->menu_list,
g_settings.video.shader_dir,
settings->video.shader_dir,
label,
type,
idx);
@ -173,44 +174,53 @@ static int action_ok_push_default(const char *path,
static int action_ok_shader_preset(const char *path,
const char *label, unsigned type, size_t idx)
{
menu_handle_t *menu = menu_driver_resolve();
menu_handle_t *menu = menu_driver_resolve();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
return menu_list_push_stack_refresh(
menu->menu_list,
g_settings.video.shader_dir,
settings->video.shader_dir,
label, type, idx);
}
static int action_ok_push_content_list(const char *path,
const char *label, unsigned type, size_t idx)
{
menu_handle_t *menu = menu_driver_resolve();
menu_handle_t *menu = menu_driver_resolve();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
return menu_list_push_stack_refresh(
menu->menu_list,
g_settings.menu_content_directory,
settings->menu_content_directory,
label, MENU_FILE_DIRECTORY, idx);
}
static int action_ok_disk_image_append_list(const char *path,
const char *label, unsigned type, size_t idx)
{
menu_handle_t *menu = menu_driver_resolve();
menu_handle_t *menu = menu_driver_resolve();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
return menu_list_push_stack_refresh(
menu->menu_list,
g_settings.menu_content_directory, label, type,
settings->menu_content_directory, label, type,
idx);
}
static int action_ok_configurations_list(const char *path,
const char *label, unsigned type, size_t idx)
{
const char *dir = g_settings.menu_config_directory;
menu_handle_t *menu = menu_driver_resolve();
settings_t *settings = config_get_ptr();
menu_handle_t *menu = menu_driver_resolve();
const char *dir = settings->menu_config_directory;
if (!menu)
return -1;
@ -223,13 +233,14 @@ static int action_ok_configurations_list(const char *path,
static int action_ok_cheat_file(const char *path,
const char *label, unsigned type, size_t idx)
{
menu_handle_t *menu = menu_driver_resolve();
menu_handle_t *menu = menu_driver_resolve();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
return menu_list_push_stack_refresh(
menu->menu_list,
g_settings.cheat_database,
settings->cheat_database,
label, type, idx);
}
@ -242,13 +253,14 @@ static int action_ok_audio_dsp_plugin(const char *path,
static int action_ok_video_filter(const char *path,
const char *label, unsigned type, size_t idx)
{
menu_handle_t *menu = menu_driver_resolve();
menu_handle_t *menu = menu_driver_resolve();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
return menu_list_push_stack_refresh(
menu->menu_list,
g_settings.video.filter_dir,
settings->video.filter_dir,
"deferred_video_filter",
0, idx);
}
@ -257,8 +269,9 @@ static int action_ok_core_updater_list(const char *path,
const char *label, unsigned type, size_t idx)
{
char url_path[PATH_MAX_LENGTH];
menu_handle_t *menu = menu_driver_resolve();
driver_t *driver = driver_get_ptr();
menu_handle_t *menu = menu_driver_resolve();
driver_t *driver = driver_get_ptr();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
@ -271,15 +284,13 @@ static int action_ok_core_updater_list(const char *path,
core_updater_list_type = type;
#endif
if (g_settings.network.buildbot_url[0] == '\0')
{
if (settings->network.buildbot_url[0] == '\0')
return -1;
}
#ifdef HAVE_NETWORKING
rarch_main_command(RARCH_CMD_NETWORK_INIT);
fill_pathname_join(url_path, g_settings.network.buildbot_url,
fill_pathname_join(url_path, settings->network.buildbot_url,
".index", sizeof(url_path));
rarch_main_data_msg_queue_push(DATA_TYPE_HTTP, url_path, "cb_core_updater_list", 0, 1,
@ -294,26 +305,30 @@ static int action_ok_core_updater_list(const char *path,
static int action_ok_remap_file(const char *path,
const char *label, unsigned type, size_t idx)
{
menu_handle_t *menu = menu_driver_resolve();
menu_handle_t *menu = menu_driver_resolve();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
return menu_list_push_stack_refresh(
menu->menu_list,
g_settings.input_remapping_directory,
settings->input_remapping_directory,
label, type, idx);
}
static int action_ok_core_list(const char *path,
const char *label, unsigned type, size_t idx)
{
menu_handle_t *menu = menu_driver_resolve();
menu_handle_t *menu = menu_driver_resolve();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
return menu_list_push_stack_refresh(
menu->menu_list,
g_settings.libretro_directory,
settings->libretro_directory,
label, type, idx);
}
@ -343,9 +358,11 @@ static int action_ok_remap_file_load(const char *path,
static int action_ok_video_filter_file_load(const char *path,
const char *label, unsigned type, size_t idx)
{
const char *menu_path = NULL;
char filter_path[PATH_MAX_LENGTH];
menu_handle_t *menu = menu_driver_resolve();
const char *menu_path = NULL;
menu_handle_t *menu = menu_driver_resolve();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
@ -357,8 +374,8 @@ static int action_ok_video_filter_file_load(const char *path,
fill_pathname_join(filter_path, menu_path, path, sizeof(filter_path));
strlcpy(g_settings.video.softfilter_plugin, filter_path,
sizeof(g_settings.video.softfilter_plugin));
strlcpy(settings->video.softfilter_plugin, filter_path,
sizeof(settings->video.softfilter_plugin));
rarch_main_command(RARCH_CMD_REINIT);
@ -399,11 +416,12 @@ static int action_ok_cheat_file_load(const char *path,
static int action_ok_menu_wallpaper_load(const char *path,
const char *label, unsigned type, size_t idx)
{
const char *menu_label = NULL;
const char *menu_path = NULL;
rarch_setting_t *setting = NULL;
char wallpaper_path[PATH_MAX_LENGTH];
menu_handle_t *menu = menu_driver_resolve();
const char *menu_label = NULL;
const char *menu_path = NULL;
rarch_setting_t *setting = NULL;
menu_handle_t *menu = menu_driver_resolve();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
@ -419,7 +437,7 @@ static int action_ok_menu_wallpaper_load(const char *path,
if (path_file_exists(wallpaper_path))
{
strlcpy(g_settings.menu.wallpaper, wallpaper_path, sizeof(g_settings.menu.wallpaper));
strlcpy(settings->menu.wallpaper, wallpaper_path, sizeof(settings->menu.wallpaper));
rarch_main_data_msg_queue_push(DATA_TYPE_IMAGE, wallpaper_path, "cb_menu_wallpaper", 0, 1,
true);
@ -518,12 +536,14 @@ static int action_ok_path_use_directory(const char *path,
static int action_ok_core_load_deferred(const char *path,
const char *label, unsigned type, size_t idx)
{
menu_handle_t *menu = menu_driver_resolve();
menu_handle_t *menu = menu_driver_resolve();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
if (path)
strlcpy(g_settings.libretro, path, sizeof(g_settings.libretro));
strlcpy(settings->libretro, path, sizeof(settings->libretro));
strlcpy(g_extern.fullpath, menu->deferred_path,
sizeof(g_extern.fullpath));
@ -566,15 +586,17 @@ static int action_ok_core_load(const char *path,
const char *label, unsigned type, size_t idx)
{
const char *menu_path = NULL;
menu_handle_t *menu = menu_driver_resolve();
menu_handle_t *menu = menu_driver_resolve();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
menu_list_get_last_stack(menu->menu_list,
&menu_path, NULL, NULL);
fill_pathname_join(g_settings.libretro, menu_path, path,
sizeof(g_settings.libretro));
fill_pathname_join(settings->libretro, menu_path, path,
sizeof(settings->libretro));
rarch_main_command(RARCH_CMD_LOAD_CORE);
menu_list_flush_stack(menu->menu_list, MENU_SETTINGS);
#if defined(HAVE_DYNAMIC)
@ -645,7 +667,9 @@ static int action_ok_database_manager_list(const char *path,
const char *label, unsigned type, size_t idx)
{
char rdb_path[PATH_MAX_LENGTH];
menu_handle_t *menu = menu_driver_resolve();
menu_handle_t *menu = menu_driver_resolve();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
if (!path)
@ -653,7 +677,7 @@ static int action_ok_database_manager_list(const char *path,
if (!label)
return -1;
fill_pathname_join(rdb_path, g_settings.content_database,
fill_pathname_join(rdb_path, settings->content_database,
path, sizeof(rdb_path));
return menu_list_push_stack_refresh(
@ -667,12 +691,13 @@ static int action_ok_cursor_manager_list(const char *path,
const char *label, unsigned type, size_t idx)
{
char cursor_path[PATH_MAX_LENGTH];
menu_handle_t *menu = menu_driver_resolve();
menu_handle_t *menu = menu_driver_resolve();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
fill_pathname_join(cursor_path, g_settings.cursor_directory,
fill_pathname_join(cursor_path, settings->cursor_directory,
path, sizeof(cursor_path));
return menu_list_push_stack_refresh(
@ -734,7 +759,8 @@ static int action_ok_file_load_with_detect_core(const char *path,
{
int ret;
const char *menu_path = NULL;
menu_handle_t *menu = menu_driver_resolve();
menu_handle_t *menu = menu_driver_resolve();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
@ -756,7 +782,7 @@ static int action_ok_file_load_with_detect_core(const char *path,
if (ret == 0)
menu_list_push_stack_refresh(
menu->menu_list,
g_settings.libretro_directory,
settings->libretro_directory,
"deferred_core_list",
0, idx);
@ -831,8 +857,9 @@ static int action_ok_custom_viewport(const char *path,
{
/* Start with something sane. */
video_viewport_t *custom = &g_extern.console.screen.viewports.custom_vp;
menu_handle_t *menu = menu_driver_resolve();
driver_t *driver = driver_get_ptr();
menu_handle_t *menu = menu_driver_resolve();
driver_t *driver = driver_get_ptr();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
@ -852,7 +879,7 @@ static int action_ok_custom_viewport(const char *path,
aspectratio_lut[ASPECT_RATIO_CUSTOM].value =
(float)custom->width / custom->height;
g_settings.video.aspect_ratio_idx = ASPECT_RATIO_CUSTOM;
settings->video.aspect_ratio_idx = ASPECT_RATIO_CUSTOM;
rarch_main_command(RARCH_CMD_VIDEO_SET_ASPECT_RATIO);
return 0;
@ -889,8 +916,9 @@ static int action_ok_core_updater_download(const char *path,
{
#ifdef HAVE_NETWORKING
char core_path[PATH_MAX_LENGTH], msg[PATH_MAX_LENGTH];
settings_t *settings = config_get_ptr();
fill_pathname_join(core_path, g_settings.network.buildbot_url,
fill_pathname_join(core_path, settings->network.buildbot_url,
path, sizeof(core_path));
strlcpy(core_updater_path, path, sizeof(core_updater_path));

View File

@ -45,9 +45,11 @@ static void menu_action_setting_disp_set_label_remap_file_load(
const char *path,
char *path_buf, size_t path_buf_size)
{
settings_t *settings = config_get_ptr();
*w = 19;
strlcpy(path_buf, path, path_buf_size);
fill_pathname_base(type_str, g_settings.input.remapping_path,
fill_pathname_base(type_str, settings->input.remapping_path,
type_str_size);
}
@ -116,13 +118,15 @@ static void menu_action_setting_disp_set_label_filter(
const char *path,
char *path_buf, size_t path_buf_size)
{
settings_t *settings = config_get_ptr();
*type_str = '\0';
*w = 19;
strlcpy(path_buf, path, path_buf_size);
strlcpy(type_str, "N/A", type_str_size);
if (*g_settings.video.softfilter_plugin)
strlcpy(type_str, path_basename(g_settings.video.softfilter_plugin),
if (*settings->video.softfilter_plugin)
strlcpy(type_str, path_basename(settings->video.softfilter_plugin),
type_str_size);
}
@ -188,10 +192,12 @@ static void menu_action_setting_disp_set_label_shader_default_filter(
const char *path,
char *path_buf, size_t path_buf_size)
{
settings_t *settings = config_get_ptr();
*type_str = '\0';
*w = 19;
snprintf(type_str, type_str_size, "%s",
g_settings.video.smooth ? "Linear" : "Nearest");
settings->video.smooth ? "Linear" : "Nearest");
}
static void menu_action_setting_disp_set_label_shader_parameter(
@ -333,16 +339,17 @@ static void menu_action_setting_disp_set_label_input_desc(
const char *path,
char *path_buf, size_t path_buf_size)
{
settings_t *settings = config_get_ptr();
unsigned inp_desc_index_offset = type - MENU_SETTINGS_INPUT_DESC_BEGIN;
unsigned inp_desc_user = inp_desc_index_offset /
RARCH_FIRST_CUSTOM_BIND;
unsigned inp_desc_button_index_offset = inp_desc_index_offset -
(inp_desc_user * RARCH_FIRST_CUSTOM_BIND);
unsigned remap_id = g_settings.input.remap_ids
unsigned remap_id = settings->input.remap_ids
[inp_desc_user][inp_desc_button_index_offset];
snprintf(type_str, type_str_size, "%s",
g_settings.input.binds[inp_desc_user][remap_id].desc);
settings->input.binds[inp_desc_user][remap_id].desc);
*w = 19;
strlcpy(path_buf, path, path_buf_size);
}

View File

@ -27,7 +27,9 @@
static int action_start_remap_file_load(unsigned type, const char *label,
unsigned action)
{
g_settings.input.remapping_path[0] = '\0';
settings_t *settings = config_get_ptr();
settings->input.remapping_path[0] = '\0';
input_remapping_set_defaults();
return 0;
}
@ -35,7 +37,9 @@ static int action_start_remap_file_load(unsigned type, const char *label,
static int action_start_video_filter_file_load(unsigned type, const char *label,
unsigned action)
{
g_settings.video.softfilter_plugin[0] = '\0';
settings_t *settings = config_get_ptr();
settings->video.softfilter_plugin[0] = '\0';
rarch_main_command(RARCH_CMD_REINIT);
return 0;
}
@ -62,6 +66,7 @@ static int action_start_performance_counters_core(unsigned type, const char *lab
static int action_start_input_desc(unsigned type, const char *label,
unsigned action)
{
settings_t *settings = config_get_ptr();
unsigned inp_desc_index_offset = type - MENU_SETTINGS_INPUT_DESC_BEGIN;
unsigned inp_desc_user = inp_desc_index_offset / RARCH_FIRST_CUSTOM_BIND;
unsigned inp_desc_button_index_offset = inp_desc_index_offset - (inp_desc_user * RARCH_FIRST_CUSTOM_BIND);
@ -69,8 +74,8 @@ static int action_start_input_desc(unsigned type, const char *label,
(void)label;
(void)action;
g_settings.input.remap_ids[inp_desc_user][inp_desc_button_index_offset] =
g_settings.input.binds[inp_desc_user][inp_desc_button_index_offset].id;
settings->input.remap_ids[inp_desc_user][inp_desc_button_index_offset] =
settings->input.binds[inp_desc_user][inp_desc_button_index_offset].id;
return 0;
}

View File

@ -117,20 +117,17 @@ static int action_toggle_input_desc(unsigned type, const char *label,
unsigned inp_desc_index_offset = type - MENU_SETTINGS_INPUT_DESC_BEGIN;
unsigned inp_desc_user = inp_desc_index_offset / RARCH_FIRST_CUSTOM_BIND;
unsigned inp_desc_button_index_offset = inp_desc_index_offset - (inp_desc_user * RARCH_FIRST_CUSTOM_BIND);
settings_t *settings = config_get_ptr();
switch (action)
{
case MENU_ACTION_LEFT:
if (g_settings.input.remap_ids[inp_desc_user][inp_desc_button_index_offset] > 0)
{
g_settings.input.remap_ids[inp_desc_user][inp_desc_button_index_offset]--;
}
if (settings->input.remap_ids[inp_desc_user][inp_desc_button_index_offset] > 0)
settings->input.remap_ids[inp_desc_user][inp_desc_button_index_offset]--;
break;
case MENU_ACTION_RIGHT:
if (g_settings.input.remap_ids[inp_desc_user][inp_desc_button_index_offset] < RARCH_FIRST_CUSTOM_BIND)
{
g_settings.input.remap_ids[inp_desc_user][inp_desc_button_index_offset]++;
}
if (settings->input.remap_ids[inp_desc_user][inp_desc_button_index_offset] < RARCH_FIRST_CUSTOM_BIND)
settings->input.remap_ids[inp_desc_user][inp_desc_button_index_offset]++;
break;
}
@ -140,17 +137,17 @@ static int action_toggle_input_desc(unsigned type, const char *label,
static int action_toggle_save_state(unsigned type, const char *label,
unsigned action, bool wraparound)
{
settings_t *settings = config_get_ptr();
switch (action)
{
case MENU_ACTION_LEFT:
/* Slot -1 is (auto) slot. */
if (g_settings.state_slot >= 0)
{
g_settings.state_slot--;
}
if (settings->state_slot >= 0)
settings->state_slot--;
break;
case MENU_ACTION_RIGHT:
g_settings.state_slot++;
settings->state_slot++;
break;
}

View File

@ -47,7 +47,8 @@ void menu_navigation_clear(menu_navigation_t *nav, bool pending_push)
**/
void menu_navigation_decrement(menu_navigation_t *nav, unsigned scroll_speed)
{
driver_t *driver = driver_get_ptr();
driver_t *driver = driver_get_ptr();
settings_t *settings = config_get_ptr();
if (!nav)
return;
@ -57,7 +58,7 @@ void menu_navigation_decrement(menu_navigation_t *nav, unsigned scroll_speed)
nav->selection_ptr - scroll_speed, true);
else
{
if (g_settings.menu.navigation.wraparound.vertical_enable)
if (settings->menu.navigation.wraparound.vertical_enable)
menu_navigation_set(nav,
menu_list_get_size(driver->menu->menu_list) - 1, true);
else
@ -75,7 +76,9 @@ void menu_navigation_decrement(menu_navigation_t *nav, unsigned scroll_speed)
**/
void menu_navigation_increment(menu_navigation_t *nav, unsigned scroll_speed)
{
driver_t *driver = driver_get_ptr();
driver_t *driver = driver_get_ptr();
settings_t *settings = config_get_ptr();
if (!nav)
return;
@ -84,7 +87,7 @@ void menu_navigation_increment(menu_navigation_t *nav, unsigned scroll_speed)
nav->selection_ptr + scroll_speed, true);
else
{
if (g_settings.menu.navigation.wraparound.vertical_enable)
if (settings->menu.navigation.wraparound.vertical_enable)
menu_navigation_clear(nav, false);
else
menu_navigation_set(nav,

File diff suppressed because it is too large Load Diff

View File

@ -46,6 +46,11 @@ static char *g_auto_path = NULL;
static char *g_driver = NULL;
static unsigned g_meta_level = 0;
settings_t *config_get_ptr(void)
{
return &g_settings;
}
driver_t *driver_get_ptr(void)
{
return &driver;