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)
|
if (isFullscreen)
|
||||||
ChangeDisplaySettings(NULL, 0);
|
ChangeDisplaySettings(NULL, 0);
|
||||||
|
|
||||||
|
//release dc
|
||||||
|
if (hdc != NULL) {
|
||||||
|
ReleaseDC(hwnd, hdc);
|
||||||
|
}
|
||||||
|
|
||||||
if (hwnd != NULL) {
|
if (hwnd != NULL) {
|
||||||
// Vape the window
|
// Vape the window
|
||||||
DestroyWindow(hwnd);
|
DestroyWindow(hwnd);
|
||||||
|
@ -163,7 +168,6 @@ LRESULT CALLBACK WindowProc(HWND hWnd,
|
||||||
}
|
}
|
||||||
case WM_ACTIVATE:
|
case WM_ACTIVATE:
|
||||||
{
|
{
|
||||||
|
|
||||||
switch(LOWORD(wParam)) {
|
switch(LOWORD(wParam)) {
|
||||||
case WA_ACTIVE:
|
case WA_ACTIVE:
|
||||||
case WA_CLICKACTIVE:
|
case WA_CLICKACTIVE:
|
||||||
|
|
Loading…
Reference in New Issue