diff options
| author | Manolo Gouy <Manolo> | 2016-06-22 07:45:53 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-06-22 07:45:53 +0000 |
| commit | 22596d3f5ffb014831e82b78438cb7e8b3fe75a4 (patch) | |
| tree | 9491b409012ddd2a13e9f2f8dff30791cc0d2c0c /src/glut_compatability.cxx | |
| parent | 0ff9df96d990bba31f9aadd5dc37e44758c0130c (diff) | |
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
Diffstat (limited to 'src/glut_compatability.cxx')
| -rw-r--r-- | src/glut_compatability.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
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) { |
