Add RARCH_CMD_RESIZE_WINDOWED_SCALE

This commit is contained in:
twinaphex 2014-10-29 06:26:08 +01:00
parent 8ae32d6bd6
commit 9b4c794261
2 changed files with 16 additions and 0 deletions

View File

@ -158,6 +158,7 @@ enum basic_event
RARCH_CMD_DRIVERS_DEINIT,
RARCH_CMD_DRIVERS_INIT,
RARCH_CMD_AUDIO_REINIT,
RARCH_CMD_RESIZE_WINDOWED_SCALE,
RARCH_CMD_TEMPORARY_CONTENT_DEINIT,
RARCH_CMD_SUBSYSTEM_FULLPATHS_DEINIT,
RARCH_CMD_LOG_FILE_DEINIT,
@ -516,6 +517,10 @@ struct global
char bps_name[PATH_MAX];
char ips_name[PATH_MAX];
struct
{
unsigned windowed_scale;
} pending;
struct
{

View File

@ -2203,6 +2203,17 @@ bool rarch_main_command(unsigned cmd)
#endif
main_state(cmd);
break;
case RARCH_CMD_RESIZE_WINDOWED_SCALE:
if (g_extern.pending.windowed_scale != 0)
{
g_settings.video.scale = g_extern.pending.windowed_scale;
if (!g_settings.video.fullscreen)
rarch_main_command(RARCH_CMD_REINIT);
g_extern.pending.windowed_scale = 0;
}
break;
case RARCH_CMD_MENU_TOGGLE:
if (g_extern.is_menu)
rarch_main_set_state(RARCH_ACTION_STATE_MENU_RUNNING_FINISHED);