mirror of
https://github.com/libretro/RetroArch
synced 2025-04-03 01:21:10 +00:00
Refactor away rarch_reinit_drivers
This commit is contained in:
parent
8c87ea7233
commit
8082dfb9cc
2
driver.c
2
driver.c
@ -501,7 +501,7 @@ retro_proc_address_t driver_get_proc_address(const char *sym)
|
||||
bool driver_update_system_av_info(const struct retro_system_av_info *info)
|
||||
{
|
||||
g_extern.system.av_info = *info;
|
||||
rarch_reinit_drivers();
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
// Cannot continue recording with different parameters.
|
||||
// Take the easiest route out and just restart the recording.
|
||||
#ifdef HAVE_RECORD
|
||||
|
@ -2574,7 +2574,7 @@ static int menu_common_iterate(unsigned action)
|
||||
else if (menu_type == MENU_SETTINGS_VIDEO_SOFTFILTER)
|
||||
{
|
||||
fill_pathname_join(g_settings.video.filter_path, dir, path, sizeof(g_settings.video.filter_path));
|
||||
rarch_reinit_drivers();
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
menu_flush_stack_type(MENU_SETTINGS_VIDEO_OPTIONS);
|
||||
}
|
||||
else if (menu_type == MENU_SETTINGS_AUDIO_DSP_FILTER)
|
||||
@ -3743,7 +3743,7 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
||||
case MENU_ACTION_OK:
|
||||
#ifdef HAVE_FILTERS_BUILTIN
|
||||
driver.menu_data_own = true;
|
||||
rarch_reinit_drivers();
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
#elif defined(HAVE_DYLIB)
|
||||
file_list_push(driver.menu->menu_stack, g_settings.video.filter_dir, setting, driver.menu->selection_ptr);
|
||||
menu_clear_navigation(driver.menu);
|
||||
@ -3757,7 +3757,7 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
||||
strlcpy(g_settings.video.filter_path, "", sizeof(g_settings.video.filter_path));
|
||||
#endif
|
||||
driver.menu_data_own = true;
|
||||
rarch_reinit_drivers();
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -4227,7 +4227,7 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
||||
g_extern.lifecycle_state &= ~(1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE);
|
||||
}
|
||||
|
||||
rarch_reinit_drivers();
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
}
|
||||
break;
|
||||
case MENU_SETTINGS_VIDEO_PAL60:
|
||||
@ -4243,7 +4243,7 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
||||
else
|
||||
g_extern.lifecycle_state |= (1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE);
|
||||
|
||||
rarch_reinit_drivers();
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
}
|
||||
break;
|
||||
case MENU_ACTION_START:
|
||||
@ -4251,7 +4251,7 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
||||
{
|
||||
g_extern.lifecycle_state &= ~(1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE);
|
||||
|
||||
rarch_reinit_drivers();
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ void engine_handle_cmd(void *data)
|
||||
slock_unlock(android_app->mutex);
|
||||
|
||||
if (g_extern.is_paused)
|
||||
rarch_reinit_drivers();
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
break;
|
||||
|
||||
case APP_CMD_RESUME:
|
||||
|
@ -796,10 +796,6 @@ void rarch_load_state(void);
|
||||
void rarch_save_state(void);
|
||||
void rarch_state_slot_increase(void);
|
||||
void rarch_state_slot_decrease(void);
|
||||
static inline void rarch_reinit_drivers(void)
|
||||
{
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
}
|
||||
|
||||
#ifdef HAVE_RECORD
|
||||
void rarch_init_recording(void);
|
||||
|
@ -1010,12 +1010,12 @@ static void general_write_handler(const void *data)
|
||||
else if (!strcmp(setting->name, "video_monitor_index"))
|
||||
{
|
||||
g_settings.video.monitor_index = *setting->value.unsigned_integer;
|
||||
rarch_reinit_drivers();
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
}
|
||||
else if (!strcmp(setting->name, "video_disable_composition"))
|
||||
{
|
||||
g_settings.video.disable_composition = *setting->value.boolean;
|
||||
rarch_reinit_drivers();
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
}
|
||||
else if (!strcmp(setting->name, "video_vsync"))
|
||||
g_settings.video.vsync = *setting->value.boolean;
|
||||
@ -1028,7 +1028,7 @@ static void general_write_handler(const void *data)
|
||||
else if (!strcmp(setting->name, "video_fullscreen"))
|
||||
{
|
||||
g_settings.video.fullscreen = *setting->value.boolean;
|
||||
rarch_reinit_drivers();
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
}
|
||||
else if (!strcmp(setting->name, "video_rotation"))
|
||||
{
|
||||
@ -1038,7 +1038,7 @@ static void general_write_handler(const void *data)
|
||||
else if (!strcmp(setting->name, "video_threaded"))
|
||||
{
|
||||
g_settings.video.threaded = *setting->value.boolean;
|
||||
rarch_reinit_drivers();
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
}
|
||||
else if (!strcmp(setting->name, "video_swap_interval"))
|
||||
{
|
||||
@ -1197,7 +1197,7 @@ static void general_write_handler(const void *data)
|
||||
*scale = max(*scale, 1.0f);
|
||||
|
||||
if (!g_settings.video.fullscreen)
|
||||
rarch_reinit_drivers();
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
}
|
||||
else if (!strcmp(setting->name, "video_yscale"))
|
||||
{
|
||||
@ -1207,7 +1207,7 @@ static void general_write_handler(const void *data)
|
||||
*scale = max(*scale, 1.0f);
|
||||
|
||||
if (!g_settings.video.fullscreen)
|
||||
rarch_reinit_drivers();
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
}
|
||||
else if (!strcmp(setting->name, "video_force_aspect"))
|
||||
g_settings.video.force_aspect = *setting->value.boolean;
|
||||
@ -1289,7 +1289,7 @@ static void general_write_handler(const void *data)
|
||||
else if (!strcmp(setting->name, "video_filter"))
|
||||
{
|
||||
strlcpy(g_settings.video.filter_path, setting->value.string, sizeof(g_settings.video.filter_path));
|
||||
rarch_reinit_drivers();
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
}
|
||||
#ifdef HAVE_CAMERA
|
||||
else if (!strcmp(setting->name, "camera_allow"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user