From f129964dc87dcf78c34fec4558a57df679a3ff0e Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sun, 8 May 2016 16:56:15 +0000 Subject: 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 --- src/gl_draw.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src') 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(); -- cgit v1.2.3