mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Fixed a memory leak in sf::Window implementation on Windows
Synchronized sfml2 with trunk git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1280 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
3fb9888b49
commit
a32d30c1be
@ -150,10 +150,12 @@ myIsCursorIn (false)
|
||||
RegisterWindowClass();
|
||||
|
||||
// Compute position and size
|
||||
int Left = (GetDeviceCaps(GetDC(NULL), HORZRES) - Mode.Width) / 2;
|
||||
int Top = (GetDeviceCaps(GetDC(NULL), VERTRES) - Mode.Height) / 2;
|
||||
HDC ScreenDC = GetDC(NULL);
|
||||
int Left = (GetDeviceCaps(ScreenDC, HORZRES) - Mode.Width) / 2;
|
||||
int Top = (GetDeviceCaps(ScreenDC, VERTRES) - Mode.Height) / 2;
|
||||
int Width = myWidth = Mode.Width;
|
||||
int Height = myHeight = Mode.Height;
|
||||
ReleaseDC(NULL, ScreenDC);
|
||||
|
||||
// Choose the window style according to the Style parameter
|
||||
DWORD Win32Style = WS_VISIBLE;
|
||||
|
Loading…
Reference in New Issue
Block a user