HDC leak fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: glcanvas.cpp
|
// Name: src/msw/glcanvas.cpp
|
||||||
// Purpose: wxGLCanvas, for using OpenGL with wxWindows under MS Windows
|
// Purpose: wxGLCanvas, for using OpenGL with wxWindows under MS Windows
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -725,7 +725,7 @@ bool wxGLApp::InitGLVisual(int *attribList)
|
|||||||
AdjustPFDForAttributes(pfd, attribList);
|
AdjustPFDForAttributes(pfd, attribList);
|
||||||
|
|
||||||
// use DC for whole (root) screen, since no windows have yet been created
|
// use DC for whole (root) screen, since no windows have yet been created
|
||||||
pixelFormat = ChoosePixelFormat((HDC) ::GetDC(NULL), &pfd);
|
pixelFormat = ChoosePixelFormat(ScreenHDC(), &pfd);
|
||||||
|
|
||||||
if (pixelFormat == 0) {
|
if (pixelFormat == 0) {
|
||||||
wxLogError(_("Failed to initialize OpenGL"));
|
wxLogError(_("Failed to initialize OpenGL"));
|
||||||
|
Reference in New Issue
Block a user