[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r3462 - trunk/pingus/src/input
From: |
plouj at BerliOS |
Subject: |
[Pingus-CVS] r3462 - trunk/pingus/src/input |
Date: |
Fri, 2 Nov 2007 00:17:56 +0100 |
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)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r3462 - trunk/pingus/src/input,
plouj at BerliOS <=