mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 09:40:06 +00:00
Refactor rarch_set_fullscreen calls to rarch_main_command
This commit is contained in:
parent
c201a546a3
commit
d70693345c
3
driver.c
3
driver.c
@ -501,7 +501,8 @@ 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_set_fullscreen(g_settings.video.fullscreen);
|
||||
rarch_main_command(RARCH_CMD_REINIT);
|
||||
|
||||
// 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_set_fullscreen(g_settings.video.fullscreen);
|
||||
rarch_main_command(RARCH_CMD_REINIT);
|
||||
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_set_fullscreen(g_settings.video.fullscreen);
|
||||
rarch_main_command(RARCH_CMD_REINIT);
|
||||
#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_set_fullscreen(g_settings.video.fullscreen);
|
||||
rarch_main_command(RARCH_CMD_REINIT);
|
||||
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_set_fullscreen(g_settings.video.fullscreen);
|
||||
rarch_main_command(RARCH_CMD_REINIT);
|
||||
}
|
||||
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_set_fullscreen(g_settings.video.fullscreen);
|
||||
rarch_main_command(RARCH_CMD_REINIT);
|
||||
}
|
||||
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_set_fullscreen(g_settings.video.fullscreen);
|
||||
rarch_main_command(RARCH_CMD_REINIT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ void engine_handle_cmd(void *data)
|
||||
slock_unlock(android_app->mutex);
|
||||
|
||||
if (g_extern.is_paused)
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
rarch_main_command(RARCH_CMD_REINIT);
|
||||
break;
|
||||
|
||||
case APP_CMD_RESUME:
|
||||
|
@ -99,6 +99,7 @@ enum basic_event
|
||||
RARCH_CMD_TAKE_SCREENSHOT,
|
||||
RARCH_CMD_PREPARE_DUMMY,
|
||||
RARCH_CMD_QUIT,
|
||||
RARCH_CMD_REINIT,
|
||||
};
|
||||
|
||||
enum menu_enums
|
||||
@ -781,7 +782,6 @@ void rarch_check_overlay(void);
|
||||
void rarch_check_block_hotkey(void);
|
||||
void rarch_init_rewind(void);
|
||||
void rarch_deinit_rewind(void);
|
||||
void rarch_set_fullscreen(bool fullscreen);
|
||||
bool rarch_check_fullscreen(void);
|
||||
void rarch_disk_control_set_eject(bool state, bool log);
|
||||
void rarch_disk_control_set_index(unsigned index);
|
||||
|
@ -2014,7 +2014,7 @@ static void check_savestates(bool immutable)
|
||||
}
|
||||
}
|
||||
|
||||
void rarch_set_fullscreen(bool fullscreen)
|
||||
static void rarch_set_fullscreen(bool fullscreen)
|
||||
{
|
||||
g_settings.video.fullscreen = fullscreen;
|
||||
driver.video_cache_context = g_extern.system.hw_render_callback.cache_context;
|
||||
@ -2038,7 +2038,7 @@ bool rarch_check_fullscreen(void)
|
||||
if (toggle)
|
||||
{
|
||||
g_settings.video.fullscreen = !g_settings.video.fullscreen;
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
rarch_main_command(RARCH_CMD_REINIT);
|
||||
}
|
||||
|
||||
was_pressed = pressed;
|
||||
@ -3143,6 +3143,9 @@ void rarch_main_command(unsigned action)
|
||||
case RARCH_CMD_QUIT:
|
||||
g_extern.system.shutdown = true;
|
||||
break;
|
||||
case RARCH_CMD_REINIT:
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1340,7 +1340,7 @@ static void general_write_handler(const void *data)
|
||||
g_settings.user_language = *setting->value.unsigned_integer;
|
||||
|
||||
if (has_set_reinit)
|
||||
rarch_set_fullscreen(g_settings.video.fullscreen);
|
||||
rarch_main_command(RARCH_CMD_REINIT);
|
||||
}
|
||||
|
||||
#define NEXT (list[index++])
|
||||
|
Loading…
x
Reference in New Issue
Block a user