From f33b45f1d30653fb5da4817089e38ff0a2413cfb Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Thu, 18 Feb 2016 16:21:51 +0000 Subject: Remove all uses of the fl_gc global variable. Towards a clean driver model. fl_gc remains usable by the application as a hook into the system. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11189 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx') diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx index 52bb3f79f..cc0df0957 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx @@ -21,6 +21,7 @@ #include "Fl_WinAPI_Screen_Driver.h" #include #include +#include #include #include @@ -58,9 +59,10 @@ int Fl_WinAPI_Screen_Driver::visual(int flags) { fl_GetDC(0); if (flags & FL_DOUBLE) return 0; + HDC gc = (HDC)Fl_Display_Device::display_device()->driver()->get_gc(); if (!(flags & FL_INDEX) && - GetDeviceCaps(fl_gc,BITSPIXEL) <= 8) return 0; - if ((flags & FL_RGB8) && GetDeviceCaps(fl_gc,BITSPIXEL)<24) return 0; + GetDeviceCaps(gc,BITSPIXEL) <= 8) return 0; + if ((flags & FL_RGB8) && GetDeviceCaps(gc,BITSPIXEL)<24) return 0; return 1; } -- cgit v1.2.3