Skip to content

Commit

Permalink
Fix gl_draw() in normal window under WIN32.
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11720 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Manolo Gouy authored and Manolo Gouy committed May 8, 2016
1 parent 8813f93 commit 188f801
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Fl_Gl_Choice.cxx
Expand Up @@ -134,8 +134,8 @@ Fl_Gl_Choice *Fl_WinAPI_Gl_Window_Driver::find(int m, const int *alistp)
if (g) return g;

// Replacement for ChoosePixelFormat() that finds one with an overlay
// if possible:
HDC gc = (HDC)fl_graphics_driver->gc();
// if possible:)
HDC gc = (HDC)(fl_graphics_driver ? fl_graphics_driver->gc() : 0);
if (!gc) gc = fl_GetDC(0);
int pixelformat = 0;
PIXELFORMATDESCRIPTOR chosen_pfd;
Expand Down

0 comments on commit 188f801

Please sign in to comment.