mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
(Menu) Get rid of hacky menu_reinit_context - NOTE - looks like the
RGUI display driver does not clean up all the state since continually invoking rarch_set_fullscreen will eventually cause segfaults
This commit is contained in:
parent
779c467191
commit
34ed0b3e04
@ -1283,14 +1283,6 @@ static void menu_common_defer_decision_manual(void *data)
|
||||
rgui->need_refresh = true;
|
||||
}
|
||||
|
||||
static void menu_reinit_context(void *data)
|
||||
{
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
|
||||
data = (void*)driver.menu;
|
||||
(void)data;
|
||||
}
|
||||
|
||||
static int menu_common_iterate(unsigned action)
|
||||
{
|
||||
int ret = 0;
|
||||
@ -1565,7 +1557,7 @@ static int menu_common_iterate(unsigned action)
|
||||
else if (menu_type == RGUI_SETTINGS_VIDEO_SOFTFILTER)
|
||||
{
|
||||
fill_pathname_join(g_settings.video.filter_path, dir, path, sizeof(g_settings.video.filter_path));
|
||||
menu_reinit_context(rgui);
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
menu_flush_stack_type(RGUI_SETTINGS_VIDEO_OPTIONS);
|
||||
}
|
||||
else if (menu_type == RGUI_SETTINGS_AUDIO_DSP_FILTER)
|
||||
@ -2729,7 +2721,7 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
||||
file_list_push(rgui->menu_stack, g_settings.video.filter_dir, setting, rgui->selection_ptr);
|
||||
menu_clear_navigation(rgui);
|
||||
#else
|
||||
menu_reinit_context(rgui);
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
#endif
|
||||
rgui->need_refresh = true;
|
||||
break;
|
||||
@ -2739,7 +2731,7 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
||||
#else
|
||||
strlcpy(g_settings.video.filter_path, "", sizeof(g_settings.video.filter_path));
|
||||
#endif
|
||||
menu_reinit_context(rgui);
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -3375,7 +3367,7 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
||||
|
||||
case RGUI_SETTINGS_TOGGLE_FULLSCREEN:
|
||||
if (action == RGUI_ACTION_OK)
|
||||
menu_reinit_context(rgui);
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
break;
|
||||
|
||||
#if defined(GEKKO)
|
||||
@ -3440,7 +3432,7 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
||||
g_extern.lifecycle_state &= ~(1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE);
|
||||
}
|
||||
|
||||
menu_reinit_context(rgui);
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
}
|
||||
break;
|
||||
case RGUI_SETTINGS_VIDEO_PAL60:
|
||||
@ -3456,7 +3448,7 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
||||
else
|
||||
g_extern.lifecycle_state |= (1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE);
|
||||
|
||||
menu_reinit_context(rgui);
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
}
|
||||
break;
|
||||
case RGUI_ACTION_START:
|
||||
@ -3464,7 +3456,7 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
||||
{
|
||||
g_extern.lifecycle_state &= ~(1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE);
|
||||
|
||||
menu_reinit_context(rgui);
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -3582,7 +3574,7 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
||||
*scale = max(*scale, 1.0f);
|
||||
|
||||
if (old_scale != *scale && !g_settings.video.fullscreen)
|
||||
menu_reinit_context(rgui);
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
|
||||
break;
|
||||
}
|
||||
@ -3599,7 +3591,7 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
||||
g_settings.video.threaded = false;
|
||||
|
||||
if (g_settings.video.threaded != old)
|
||||
menu_reinit_context(rgui);
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
@ -3662,20 +3654,20 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
||||
{
|
||||
case RGUI_ACTION_START:
|
||||
g_settings.video.monitor_index = 0;
|
||||
menu_reinit_context(rgui);
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
break;
|
||||
|
||||
case RGUI_ACTION_OK:
|
||||
case RGUI_ACTION_RIGHT:
|
||||
g_settings.video.monitor_index++;
|
||||
menu_reinit_context(rgui);
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
break;
|
||||
|
||||
case RGUI_ACTION_LEFT:
|
||||
if (g_settings.video.monitor_index)
|
||||
{
|
||||
g_settings.video.monitor_index--;
|
||||
menu_reinit_context(rgui);
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -3856,12 +3848,12 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
||||
if (action == RGUI_ACTION_OK || action == RGUI_ACTION_LEFT || action == RGUI_ACTION_RIGHT)
|
||||
{
|
||||
g_settings.video.disable_composition = !g_settings.video.disable_composition;
|
||||
menu_reinit_context(rgui);
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
}
|
||||
else if (action == RGUI_ACTION_START)
|
||||
{
|
||||
g_settings.video.disable_composition = false;
|
||||
menu_reinit_context(rgui);
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
}
|
||||
break;
|
||||
#ifdef HAVE_NETPLAY
|
||||
|
Loading…
x
Reference in New Issue
Block a user