macOS: rewrite opengl_plugin_device() to use less memory.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13143 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
b04700397e
commit
f53c7fd128
@ -148,8 +148,11 @@ typedef void (*KeyScript_type)(short);
|
||||
static KeyScript_type KeyScript;
|
||||
|
||||
static Fl_Device_Plugin *opengl_plugin_device() {
|
||||
static Fl_Plugin_Manager pm("fltk:device");
|
||||
static Fl_Device_Plugin *pi = (Fl_Device_Plugin*)pm.plugin("opengl.device.fltk.org");
|
||||
static Fl_Device_Plugin *pi = NULL;
|
||||
if (!pi) {
|
||||
Fl_Plugin_Manager pm("fltk:device");
|
||||
pi = (Fl_Device_Plugin*)pm.plugin("opengl.device.fltk.org");
|
||||
}
|
||||
return pi;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user