fix: releasing device context for window, as per msdn docs
This commit is contained in:
parent
f6aa685151
commit
3a28d769a7
|
@ -75,6 +75,11 @@ void destroyWindow(void)
|
|||
if (isFullscreen)
|
||||
ChangeDisplaySettings(NULL, 0);
|
||||
|
||||
//release dc
|
||||
if (hdc != NULL) {
|
||||
ReleaseDC(hwnd, hdc);
|
||||
}
|
||||
|
||||
if (hwnd != NULL) {
|
||||
// Vape the window
|
||||
DestroyWindow(hwnd);
|
||||
|
@ -163,7 +168,6 @@ LRESULT CALLBACK WindowProc(HWND hWnd,
|
|||
}
|
||||
case WM_ACTIVATE:
|
||||
{
|
||||
|
||||
switch(LOWORD(wParam)) {
|
||||
case WA_ACTIVE:
|
||||
case WA_CLICKACTIVE:
|
||||
|
|
Loading…
Reference in New Issue