summaryrefslogtreecommitdiff
path: root/src/gl_draw.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-05-08 16:56:15 +0000
committerManolo Gouy <Manolo>2016-05-08 16:56:15 +0000
commitf129964dc87dcf78c34fec4558a57df679a3ff0e (patch)
treeec8fb0f5905fd5dd00d4d6e96df9609e177033b0 /src/gl_draw.cxx
parent096cb38e1e3c717390f722ff448cf8386f4da556 (diff)
Make Fl_Cocoa_Gl_Window_Driver::draw_string() simpler
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11722 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/gl_draw.cxx')
-rw-r--r--src/gl_draw.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx
index b33844dbd..fe0d1f5a5 100644
--- a/src/gl_draw.cxx
+++ b/src/gl_draw.cxx
@@ -555,12 +555,8 @@ static gl_texture_fifo *gl_fifo = NULL; // points to the texture pile class inst
// draws a utf8 string using pre-computed texture if available
void Fl_Cocoa_Gl_Window_Driver::draw_string(const char* str, int n)
{
- Fl_Window *win = Fl_Window::current();
- if (win->as_gl_window())
- gl_scale = win->as_gl_window()->pixels_per_unit();
- else
- gl_scale = (fl_mac_os_version >= 100700 && win->shown() &&
- Fl_Cocoa_Window_Driver::driver(win)->mapped_to_retina()) ? 2 : 1;
+ Fl_Gl_Window *gwin = Fl_Window::current()->as_gl_window();
+ gl_scale = (gwin ? gwin->pixels_per_unit() : 1);
//fprintf(stderr,"gl_scale=%d\n",gl_scale);
if (! gl_fifo) gl_fifo = new gl_texture_fifo();