Use g_settings.menu.mouse.enable directly

This commit is contained in:
twinaphex 2015-03-17 04:01:58 +01:00
parent 221b27546b
commit 569ab60e43
9 changed files with 14 additions and 13 deletions

View File

@ -190,12 +190,16 @@ struct settings
{
char driver[32];
bool pause_libretro;
bool mouse_enable;
bool timedate_enable;
bool core_enable;
bool throttle;
char wallpaper[PATH_MAX_LENGTH];
struct
{
bool enable;
} mouse;
struct
{
struct

View File

@ -458,7 +458,7 @@ static void glui_frame(void)
glui->box_message[0] = '\0';
}
if (menu->mouse.enable)
if (g_settings.menu.mouse.enable)
glui_draw_cursor(gl, menu->mouse.x, menu->mouse.y);
gl_set_viewport(gl, gl->win_width, gl->win_height, false, true);

View File

@ -515,7 +515,7 @@ static void rgui_render(void)
rgui_render_messagebox(msg);
}
if (menu->mouse.enable)
if (g_settings.menu.mouse.enable)
rgui_blit_cursor(menu);
}

View File

@ -1371,7 +1371,7 @@ static void xmb_frame(void)
xmb_frame_messagebox(msg);
}
if (menu->mouse.enable)
if (g_settings.menu.mouse.enable)
xmb_draw_cursor(gl, xmb, menu->mouse.x, menu->mouse.y);
gl_set_viewport(gl, gl->win_width, gl->win_height, false, true);

View File

@ -158,7 +158,6 @@ typedef struct
int16_t dy;
int16_t x;
int16_t y;
bool enable;
bool left;
bool right;
bool oldleft;

View File

@ -161,7 +161,7 @@ static int mouse_post_iterate(menu_file_list_cbs_t *cbs, const char *path,
if (!menu)
return -1;
if (!menu->mouse.enable)
if (!g_settings.menu.mouse.enable)
return 0;
if (menu->mouse.left)
@ -578,7 +578,7 @@ static int mouse_iterate(unsigned *action)
if (!menu)
return -1;
if (!menu->mouse.enable)
if (!g_settings.menu.mouse.enable)
return 0;
if (menu->mouse.hwheeldown)

View File

@ -516,8 +516,6 @@ unsigned menu_input_frame(retro_input_t input, retro_input_t trigger_input)
menu->navigation.scroll.acceleration = 0;
}
menu->mouse.enable = g_settings.menu.mouse_enable;
menu->delay.count += menu->dt / IDEAL_DT;
if (driver.block_input)

View File

@ -490,7 +490,7 @@ static void config_set_defaults(void)
#ifdef HAVE_MENU
g_settings.menu_show_start_screen = menu_show_start_screen;
g_settings.menu.pause_libretro = true;
g_settings.menu.mouse_enable = false;
g_settings.menu.mouse.enable = false;
g_settings.menu.timedate_enable = true;
g_settings.menu.core_enable = true;
*g_settings.menu.wallpaper = '\0';
@ -1119,7 +1119,7 @@ static bool config_load_file(const char *path, bool set_defaults)
#ifdef HAVE_MENU
CONFIG_GET_BOOL(menu.pause_libretro, "menu_pause_libretro");
CONFIG_GET_BOOL(menu.mouse_enable, "menu_mouse_enable");
CONFIG_GET_BOOL(menu.mouse.enable, "menu_mouse_enable");
CONFIG_GET_BOOL(menu.timedate_enable, "menu_timedate_enable");
CONFIG_GET_BOOL(menu.core_enable, "menu_core_enable");
CONFIG_GET_BOOL(menu.navigation.wraparound.horizontal_enable, "menu_navigation_wraparound_horizontal_enable");
@ -1895,7 +1895,7 @@ bool config_save_file(const char *path)
#ifdef HAVE_MENU
config_set_string(conf,"menu_driver", g_settings.menu.driver);
config_set_bool(conf,"menu_pause_libretro", g_settings.menu.pause_libretro);
config_set_bool(conf,"menu_mouse_enable", g_settings.menu.mouse_enable);
config_set_bool(conf,"menu_mouse_enable", g_settings.menu.mouse.enable);
config_set_bool(conf,"menu_timedate_enable", g_settings.menu.timedate_enable);
config_set_bool(conf,"menu_core_enable", g_settings.menu.core_enable);
config_set_path(conf, "menu_wallpaper", g_settings.menu.wallpaper);

View File

@ -5183,7 +5183,7 @@ static bool setting_data_append_list_menu_options(
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
CONFIG_BOOL(
g_settings.menu.mouse_enable,
g_settings.menu.mouse.enable,
"menu_mouse_enable",
"Mouse Enable",
false,