From 22596d3f5ffb014831e82b78438cb7e8b3fe75a4 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 22 Jun 2016 07:45:53 +0000 Subject: Make Fl_Gl_Window::pixels_per_unit() return a float (rather than int) value. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11794 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/glut_compatability.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/glut_compatability.cxx') diff --git a/src/glut_compatability.cxx b/src/glut_compatability.cxx index 6a024d321..13e06242a 100644 --- a/src/glut_compatability.cxx +++ b/src/glut_compatability.cxx @@ -74,9 +74,9 @@ int Fl_Glut_Window::handle(int event) { make_current(); int ex = Fl::event_x(); int ey = Fl::event_y(); - int factor = pixels_per_unit(); - ex *= factor; - ey *= factor; + float factor = pixels_per_unit(); + ex = int(ex * factor + 0.5f); + ey = int(ey * factor + 0.5f); int button; switch (event) { -- cgit v1.2.3