mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-30 04:40:53 +00:00
Changed: #1198 Window is too large when switching from fullscreen to windowed mode
This commit is contained in:
parent
57a2b251ff
commit
06aa221db3
1 changed files with 4 additions and 0 deletions
|
@ -1777,12 +1777,16 @@ bool CDriverGL::setMode(const GfxMode& mode)
|
|||
if (!setScreenMode(mode))
|
||||
return false;
|
||||
|
||||
// change window size before changing style for some cases
|
||||
setWindowSize(mode.Width, mode.Height);
|
||||
|
||||
// when changing window style, it's possible system change window size too
|
||||
setWindowStyle(mode.Windowed ? EWSWindowed : EWSFullscreen);
|
||||
|
||||
if (!mode.Windowed)
|
||||
_Depth = mode.Depth;
|
||||
|
||||
// to be sure window size is correct after changing style
|
||||
setWindowSize(mode.Width, mode.Height);
|
||||
setWindowPos(_WindowX, _WindowY);
|
||||
|
||||
|
|
Loading…
Reference in a new issue