Author: plouj
Date: 2007-11-02 00:17:56 +0100 (Fri, 02 Nov 2007)
New Revision: 3462

Modified:
   trunk/pingus/src/input/core_driver.cpp
Log:
removed hard-coded default screen values


Modified: trunk/pingus/src/input/core_driver.cpp
===================================================================
--- trunk/pingus/src/input/core_driver.cpp      2007-11-01 23:16:28 UTC (rev 
3461)
+++ trunk/pingus/src/input/core_driver.cpp      2007-11-01 23:17:56 UTC (rev 
3462)
@@ -20,6 +20,7 @@
 #include "math.hpp"
 #include "manager.hpp"
 #include "core_driver.hpp"
+#include "globals.hpp"
 
 namespace Input {
 
@@ -74,8 +75,8 @@
 
     // FIXME: Shouldn't be hardcored, but shouldn't depend on Display
     // either
-    new_pos.x = Math::clamp(0.0f, new_pos.x, 800.0f);
-    new_pos.y = Math::clamp(0.0f, new_pos.y, 600.0f);
+    new_pos.x = Math::clamp(0.0f, new_pos.x, static_cast<float>(screen_width));
+    new_pos.y = Math::clamp(0.0f, new_pos.y, 
static_cast<float>(screen_height));
 
     if (new_pos != pos)
       {



_______________________________________________
pingus-cvs mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/pingus-cvs

Reply via email to