Skip to content

Commit

Permalink
macOS: rewrite opengl_plugin_device() to use less memory.
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13143 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Manolo Gouy authored and Manolo Gouy committed Nov 30, 2018
1 parent b047003 commit f53c7fd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Fl_cocoa.mm
Expand Up @@ -148,8 +148,11 @@
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;
}

Expand Down

0 comments on commit f53c7fd

Please sign in to comment.