mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 16:13:40 +00:00
Add RUNLOOP_CTL_GET_WINDOWED_SCALE
This commit is contained in:
parent
c5df156f23
commit
fcde5ae8ff
@ -1010,10 +1010,14 @@ bool event_command(enum event_command cmd)
|
||||
case EVENT_CMD_RESIZE_WINDOWED_SCALE:
|
||||
{
|
||||
unsigned idx = 0;
|
||||
if (global->pending.windowed_scale == 0)
|
||||
unsigned *window_scale = NULL;
|
||||
|
||||
runloop_ctl(RUNLOOP_CTL_GET_WINDOWED_SCALE, &window_scale);
|
||||
|
||||
if (*window_scale == 0)
|
||||
return false;
|
||||
|
||||
settings->video.scale = global->pending.windowed_scale;
|
||||
settings->video.scale = *window_scale;
|
||||
|
||||
if (!settings->video.fullscreen)
|
||||
event_command(EVENT_CMD_REINIT);
|
||||
|
@ -383,6 +383,14 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
|
||||
break;
|
||||
case RUNLOOP_CTL_IS_PERFCNT_ENABLE:
|
||||
return runloop_perfcnt_enable;
|
||||
case RUNLOOP_CTL_GET_WINDOWED_SCALE:
|
||||
{
|
||||
unsigned **scale = (unsigned**)data;
|
||||
if (!scale)
|
||||
return false;
|
||||
*scale = (unsigned*)&global->pending.windowed_scale;
|
||||
}
|
||||
break;
|
||||
case RUNLOOP_CTL_SET_WINDOWED_SCALE:
|
||||
{
|
||||
unsigned *idx = (unsigned*)data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user