changeset 35076:77a90f0b02b1

Minor simplification of rescale_input_coordinates.
author reimar
date Wed, 12 Sep 2012 20:48:08 +0000
parents c40203dd82b7
children c9d302e5e4be
files command.c
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/command.c	Wed Sep 12 20:26:09 2012 +0000
+++ b/command.c	Wed Sep 12 20:48:08 2012 +0000
@@ -81,11 +81,7 @@
         if (vo_screenheight > vo_dheight)       //there are borders along the y axis (usual way)
             iy -= (vo_screenheight - vo_dheight) / 2;
 
-        if (ix < 0 || ix > vo_dwidth) {
-            *dx = *dy = -1.0;
-            return;
-        }                       //we are on one of the borders
-        if (iy < 0 || iy > vo_dheight) {
+        if (ix < 0 || ix > vo_dwidth || iy < 0 || iy > vo_dheight) {
             *dx = *dy = -1.0;
             return;
         }                       //we are on one of the borders