Expand win32_monitor_set_fullscreen
This commit is contained in:
parent
92478a370e
commit
a7f6dced8d
|
@ -2326,7 +2326,7 @@ bool win32_suspend_screensaver(void *data, bool enable)
|
||||||
|
|
||||||
static bool win32_monitor_set_fullscreen(
|
static bool win32_monitor_set_fullscreen(
|
||||||
unsigned width, unsigned height,
|
unsigned width, unsigned height,
|
||||||
unsigned refresh, char *dev_name)
|
unsigned refresh, bool interlaced, char *dev_name)
|
||||||
{
|
{
|
||||||
DEVMODE devmode;
|
DEVMODE devmode;
|
||||||
memset(&devmode, 0, sizeof(devmode));
|
memset(&devmode, 0, sizeof(devmode));
|
||||||
|
@ -2334,9 +2334,12 @@ static bool win32_monitor_set_fullscreen(
|
||||||
devmode.dmPelsWidth = width;
|
devmode.dmPelsWidth = width;
|
||||||
devmode.dmPelsHeight = height;
|
devmode.dmPelsHeight = height;
|
||||||
devmode.dmDisplayFrequency = refresh;
|
devmode.dmDisplayFrequency = refresh;
|
||||||
|
devmode.dmDisplayFlags = interlaced ? DM_INTERLACED : 0;
|
||||||
devmode.dmFields = DM_PELSWIDTH
|
devmode.dmFields = DM_PELSWIDTH
|
||||||
| DM_PELSHEIGHT
|
| DM_PELSHEIGHT
|
||||||
| DM_DISPLAYFREQUENCY;
|
| DM_DISPLAYFREQUENCY;
|
||||||
|
if (interlaced)
|
||||||
|
devmode.dmFields |= DM_DISPLAYFLAGS;
|
||||||
return win32_change_display_settings(dev_name, &devmode,
|
return win32_change_display_settings(dev_name, &devmode,
|
||||||
CDS_FULLSCREEN) == DISP_CHANGE_SUCCESSFUL;
|
CDS_FULLSCREEN) == DISP_CHANGE_SUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
@ -2380,7 +2383,7 @@ void win32_set_style(MONITORINFOEX *current_mon, HMONITOR *hm_to_use,
|
||||||
*style = WS_POPUP | WS_VISIBLE;
|
*style = WS_POPUP | WS_VISIBLE;
|
||||||
|
|
||||||
if (win32_monitor_set_fullscreen(*width, *height,
|
if (win32_monitor_set_fullscreen(*width, *height,
|
||||||
(int)refresh_rate, current_mon->szDevice))
|
(int)refresh_rate, false, current_mon->szDevice))
|
||||||
{
|
{
|
||||||
RARCH_LOG("[Video]: Fullscreen set to %ux%u @ %uHz on device %s.\n",
|
RARCH_LOG("[Video]: Fullscreen set to %ux%u @ %uHz on device %s.\n",
|
||||||
*width, *height, (int)refresh_rate, current_mon->szDevice);
|
*width, *height, (int)refresh_rate, current_mon->szDevice);
|
||||||
|
|
Loading…
Reference in New Issue