https://git.reactos.org/?p=reactos.git;a=commitdiff;h=afb953ae4dd1ca89c66ddd...
commit afb953ae4dd1ca89c66ddd602f22146803b0709d Author: Thomas Faber thomas.faber@reactos.org AuthorDate: Mon Jan 16 19:45:03 2023 -0500 Commit: Thomas Faber thomas.faber@reactos.org CommitDate: Fri Jan 27 22:31:37 2023 -0500
[BUTTERFLIES] Do not release the DC passed to OpenGL. CORE-18498 --- modules/rosapps/applications/screensavers/butterflies/butterflies.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/rosapps/applications/screensavers/butterflies/butterflies.c b/modules/rosapps/applications/screensavers/butterflies/butterflies.c index 4c675a757a8..6d33fd35e66 100644 --- a/modules/rosapps/applications/screensavers/butterflies/butterflies.c +++ b/modules/rosapps/applications/screensavers/butterflies/butterflies.c @@ -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; }