Avoid static initializers to allow FLTK usage in static initializers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11213 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
941c301ceb
commit
6097c134d8
2
FL/Fl.H
2
FL/Fl.H
@ -46,6 +46,7 @@ class Fl_Widget;
|
||||
class Fl_Window;
|
||||
class Fl_Image;
|
||||
struct Fl_Label;
|
||||
class Fl_Screen_Driver;
|
||||
|
||||
// Keep avoiding having the socket deps at that level but mke sure it will work in both 32 & 64 bit builds
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
@ -137,7 +138,6 @@ class FL_EXPORT Fl {
|
||||
|
||||
private:
|
||||
|
||||
static class Fl_Screen_Driver *screen_driver_;
|
||||
static int use_high_res_GL_;
|
||||
|
||||
public:
|
||||
|
||||
@ -216,16 +216,12 @@ char const * const Fl::clipboard_image = "image";
|
||||
// Drivers
|
||||
//
|
||||
|
||||
Fl_Screen_Driver *Fl::screen_driver_ = Fl_Screen_Driver::newScreenDriver();
|
||||
|
||||
Fl_Screen_Driver *Fl::screen_driver()
|
||||
{
|
||||
if (!screen_driver_)
|
||||
screen_driver_ = Fl_Screen_Driver::newScreenDriver();
|
||||
static Fl_Screen_Driver* screen_driver_ = Fl_Screen_Driver::newScreenDriver();
|
||||
return screen_driver_;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// 'Fl::version()' - Return the API version number...
|
||||
//
|
||||
|
||||
Loading…
Reference in New Issue
Block a user