mirror of
https://github.com/reactos/reactos.git
synced 2025-02-20 15:35:04 +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
|
||||
|
||||
GLuint texture[3]; //stores texture objects and display list
|
||||
HDC hdcOpenGL;
|
||||
|
||||
LPCTSTR registryPath = _T("Software\\Microsoft\\ScreenSavers\\Butterflies");
|
||||
BOOL dRotate;
|
||||
|
@ -136,7 +137,7 @@ HGLRC InitOGLWindow(HWND hWnd)
|
|||
hRC = wglCreateContext(hDC);
|
||||
wglMakeCurrent(hDC, hRC);
|
||||
|
||||
ReleaseDC(hWnd, hDC);
|
||||
hdcOpenGL = hDC;
|
||||
|
||||
return hRC;
|
||||
}
|
||||
|
@ -287,6 +288,7 @@ LRESULT WINAPI ScreenSaverProc(HWND hWnd, UINT message,
|
|||
case WM_DESTROY:
|
||||
wglMakeCurrent(NULL, NULL);
|
||||
wglDeleteContext(hRC);
|
||||
ReleaseDC(hWnd, hdcOpenGL);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue