Skip to content

Commit

Permalink
Merge pull request H-uru#214 from cwalther/window-size
Browse files Browse the repository at this point in the history
Avoid truncated window size after going from fullscreen to a window of the same size
  • Loading branch information
Hoikas committed Jun 18, 2012
2 parents a2a6a2d + 4577f9f commit 4ee30c1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Sources/Plasma/Apps/plClient/plClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2181,10 +2181,10 @@ void plClient::ResetDisplayDevice(int Width, int Height, int ColorDepth, hsBool

WindowActivate(false);

ResizeDisplayDevice(Width, Height, Windowed);

fPipeline->ResetDisplayDevice(Width, Height, ColorDepth, Windowed, NumAASamples, MaxAnisotropicSamples, VSync);

ResizeDisplayDevice(Width, Height, Windowed);

WindowActivate(true);
}

Expand All @@ -2202,7 +2202,8 @@ void plClient::ResizeDisplayDevice(int Width, int Height, hsBool Windowed)
uint32_t winStyle, winExStyle;
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;
} else {
winStyle = WS_POPUP;
Expand Down

0 comments on commit 4ee30c1

Please sign in to comment.