mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 03:09:13 +00:00
Avoid truncated window size after going from fullscreen to a window of the same size.
Must set the window size after the display resolution, otherwise Windows may clamp it to a smaller size than specified.
This commit is contained in:
@ -2181,10 +2181,10 @@ void plClient::ResetDisplayDevice(int Width, int Height, int ColorDepth, hsBool
|
|||||||
|
|
||||||
WindowActivate(false);
|
WindowActivate(false);
|
||||||
|
|
||||||
ResizeDisplayDevice(Width, Height, Windowed);
|
|
||||||
|
|
||||||
fPipeline->ResetDisplayDevice(Width, Height, ColorDepth, Windowed, NumAASamples, MaxAnisotropicSamples, VSync);
|
fPipeline->ResetDisplayDevice(Width, Height, ColorDepth, Windowed, NumAASamples, MaxAnisotropicSamples, VSync);
|
||||||
|
|
||||||
|
ResizeDisplayDevice(Width, Height, Windowed);
|
||||||
|
|
||||||
WindowActivate(true);
|
WindowActivate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2202,7 +2202,8 @@ void plClient::ResizeDisplayDevice(int Width, int Height, hsBool Windowed)
|
|||||||
uint32_t winStyle, winExStyle;
|
uint32_t winStyle, winExStyle;
|
||||||
if( Windowed )
|
if( Windowed )
|
||||||
{
|
{
|
||||||
winStyle = WS_OVERLAPPEDWINDOW;
|
// WS_VISIBLE appears necessary to avoid leaving behind framebuffer junk when going from windowed to a smaller window
|
||||||
|
winStyle = WS_OVERLAPPEDWINDOW | WS_VISIBLE;
|
||||||
winExStyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;
|
winExStyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;
|
||||||
} else {
|
} else {
|
||||||
winStyle = WS_POPUP;
|
winStyle = WS_POPUP;
|
||||||
|
Reference in New Issue
Block a user