mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 23:22:57 +00:00
[BUTTERFLIES] Do not release the DC passed to OpenGL. CORE-18498
This commit is contained in:
parent
8b19b6ec5a
commit
afb953ae4d
1 changed files with 3 additions and 1 deletions
|
@ -12,6 +12,7 @@
|
||||||
HINSTANCE hInstance; // Holds The Instance Of The Application
|
HINSTANCE hInstance; // Holds The Instance Of The Application
|
||||||
|
|
||||||
GLuint texture[3]; //stores texture objects and display list
|
GLuint texture[3]; //stores texture objects and display list
|
||||||
|
HDC hdcOpenGL;
|
||||||
|
|
||||||
LPCTSTR registryPath = _T("Software\\Microsoft\\ScreenSavers\\Butterflies");
|
LPCTSTR registryPath = _T("Software\\Microsoft\\ScreenSavers\\Butterflies");
|
||||||
BOOL dRotate;
|
BOOL dRotate;
|
||||||
|
@ -136,7 +137,7 @@ HGLRC InitOGLWindow(HWND hWnd)
|
||||||
hRC = wglCreateContext(hDC);
|
hRC = wglCreateContext(hDC);
|
||||||
wglMakeCurrent(hDC, hRC);
|
wglMakeCurrent(hDC, hRC);
|
||||||
|
|
||||||
ReleaseDC(hWnd, hDC);
|
hdcOpenGL = hDC;
|
||||||
|
|
||||||
return hRC;
|
return hRC;
|
||||||
}
|
}
|
||||||
|
@ -287,6 +288,7 @@ LRESULT WINAPI ScreenSaverProc(HWND hWnd, UINT message,
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
wglMakeCurrent(NULL, NULL);
|
wglMakeCurrent(NULL, NULL);
|
||||||
wglDeleteContext(hRC);
|
wglDeleteContext(hRC);
|
||||||
|
ReleaseDC(hWnd, hdcOpenGL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue