forked from Mirrorlandia_minetest/irrlicht
CIrrDeviceWin32: readd fullscreen using borderless maximized window
This commit is contained in:
parent
02b8fc1ab6
commit
c84d8acff9
@ -1416,8 +1416,24 @@ bool CIrrDeviceWin32::switchToFullScreen()
|
|||||||
if (!CreationParams.Fullscreen)
|
if (!CreationParams.Fullscreen)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// To be filled...
|
// No border, title bar, etc. is already set up through getWindowStyle()
|
||||||
return true;
|
// We only set the window size to match the monitor.
|
||||||
|
|
||||||
|
MONITORINFO mi;
|
||||||
|
mi.cbSize = sizeof(mi);
|
||||||
|
if (GetMonitorInfo(MonitorFromWindow(HWnd,MONITOR_DEFAULTTOPRIMARY),&mi))
|
||||||
|
{
|
||||||
|
UINT flags = SWP_NOCOPYBITS|SWP_NOOWNERZORDER|SWP_FRAMECHANGED;
|
||||||
|
SetWindowPos(HWnd, HWND_TOP, mi.rcMonitor.left, mi.rcMonitor.top,
|
||||||
|
mi.rcMonitor.right - mi.rcMonitor.left,
|
||||||
|
mi.rcMonitor.bottom - mi.rcMonitor.top, flags);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CreationParams.Fullscreen = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CreationParams.Fullscreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user