mirror of
https://github.com/libretro/RetroArch
synced 2025-03-25 16:44:01 +00:00
Use g_settings.menu.mouse.enable directly
This commit is contained in:
parent
221b27546b
commit
569ab60e43
@ -190,12 +190,16 @@ struct settings
|
|||||||
{
|
{
|
||||||
char driver[32];
|
char driver[32];
|
||||||
bool pause_libretro;
|
bool pause_libretro;
|
||||||
bool mouse_enable;
|
|
||||||
bool timedate_enable;
|
bool timedate_enable;
|
||||||
bool core_enable;
|
bool core_enable;
|
||||||
bool throttle;
|
bool throttle;
|
||||||
char wallpaper[PATH_MAX_LENGTH];
|
char wallpaper[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
bool enable;
|
||||||
|
} mouse;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
|
@ -458,7 +458,7 @@ static void glui_frame(void)
|
|||||||
glui->box_message[0] = '\0';
|
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);
|
glui_draw_cursor(gl, menu->mouse.x, menu->mouse.y);
|
||||||
|
|
||||||
gl_set_viewport(gl, gl->win_width, gl->win_height, false, true);
|
gl_set_viewport(gl, gl->win_width, gl->win_height, false, true);
|
||||||
|
@ -515,7 +515,7 @@ static void rgui_render(void)
|
|||||||
rgui_render_messagebox(msg);
|
rgui_render_messagebox(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (menu->mouse.enable)
|
if (g_settings.menu.mouse.enable)
|
||||||
rgui_blit_cursor(menu);
|
rgui_blit_cursor(menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1371,7 +1371,7 @@ static void xmb_frame(void)
|
|||||||
xmb_frame_messagebox(msg);
|
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);
|
xmb_draw_cursor(gl, xmb, menu->mouse.x, menu->mouse.y);
|
||||||
|
|
||||||
gl_set_viewport(gl, gl->win_width, gl->win_height, false, true);
|
gl_set_viewport(gl, gl->win_width, gl->win_height, false, true);
|
||||||
|
@ -158,7 +158,6 @@ typedef struct
|
|||||||
int16_t dy;
|
int16_t dy;
|
||||||
int16_t x;
|
int16_t x;
|
||||||
int16_t y;
|
int16_t y;
|
||||||
bool enable;
|
|
||||||
bool left;
|
bool left;
|
||||||
bool right;
|
bool right;
|
||||||
bool oldleft;
|
bool oldleft;
|
||||||
|
@ -161,7 +161,7 @@ static int mouse_post_iterate(menu_file_list_cbs_t *cbs, const char *path,
|
|||||||
if (!menu)
|
if (!menu)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!menu->mouse.enable)
|
if (!g_settings.menu.mouse.enable)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (menu->mouse.left)
|
if (menu->mouse.left)
|
||||||
@ -578,7 +578,7 @@ static int mouse_iterate(unsigned *action)
|
|||||||
if (!menu)
|
if (!menu)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!menu->mouse.enable)
|
if (!g_settings.menu.mouse.enable)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (menu->mouse.hwheeldown)
|
if (menu->mouse.hwheeldown)
|
||||||
|
@ -516,8 +516,6 @@ unsigned menu_input_frame(retro_input_t input, retro_input_t trigger_input)
|
|||||||
menu->navigation.scroll.acceleration = 0;
|
menu->navigation.scroll.acceleration = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
menu->mouse.enable = g_settings.menu.mouse_enable;
|
|
||||||
|
|
||||||
menu->delay.count += menu->dt / IDEAL_DT;
|
menu->delay.count += menu->dt / IDEAL_DT;
|
||||||
|
|
||||||
if (driver.block_input)
|
if (driver.block_input)
|
||||||
|
@ -490,7 +490,7 @@ static void config_set_defaults(void)
|
|||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
g_settings.menu_show_start_screen = menu_show_start_screen;
|
g_settings.menu_show_start_screen = menu_show_start_screen;
|
||||||
g_settings.menu.pause_libretro = true;
|
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.timedate_enable = true;
|
||||||
g_settings.menu.core_enable = true;
|
g_settings.menu.core_enable = true;
|
||||||
*g_settings.menu.wallpaper = '\0';
|
*g_settings.menu.wallpaper = '\0';
|
||||||
@ -1119,7 +1119,7 @@ static bool config_load_file(const char *path, bool set_defaults)
|
|||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
CONFIG_GET_BOOL(menu.pause_libretro, "menu_pause_libretro");
|
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.timedate_enable, "menu_timedate_enable");
|
||||||
CONFIG_GET_BOOL(menu.core_enable, "menu_core_enable");
|
CONFIG_GET_BOOL(menu.core_enable, "menu_core_enable");
|
||||||
CONFIG_GET_BOOL(menu.navigation.wraparound.horizontal_enable, "menu_navigation_wraparound_horizontal_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
|
#ifdef HAVE_MENU
|
||||||
config_set_string(conf,"menu_driver", g_settings.menu.driver);
|
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_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_timedate_enable", g_settings.menu.timedate_enable);
|
||||||
config_set_bool(conf,"menu_core_enable", g_settings.menu.core_enable);
|
config_set_bool(conf,"menu_core_enable", g_settings.menu.core_enable);
|
||||||
config_set_path(conf, "menu_wallpaper", g_settings.menu.wallpaper);
|
config_set_path(conf, "menu_wallpaper", g_settings.menu.wallpaper);
|
||||||
|
@ -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);
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
||||||
|
|
||||||
CONFIG_BOOL(
|
CONFIG_BOOL(
|
||||||
g_settings.menu.mouse_enable,
|
g_settings.menu.mouse.enable,
|
||||||
"menu_mouse_enable",
|
"menu_mouse_enable",
|
||||||
"Mouse Enable",
|
"Mouse Enable",
|
||||||
false,
|
false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user