|
From: Yoda-JM <yo...@us...> - 2009-10-12 21:31:12
|
Module: performous
Branch: master
Commit: b11066ea5a09a1b4ad432e38bd2a86e7dceb4424
Author: Vincent Le Ligeour <yo...@us...>
Date: Mon Oct 12 23:30:56 2009 +0200
Moved input event timing into SDL specific code, so that each input event backend is reponsible for setting event time
---
game/joystick.cc | 2 ++
game/joystick.hh | 2 --
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index e799a21..17f6fb8 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -145,6 +145,8 @@ bool input::SDL::pushEvent(SDL_Event _e) {
using namespace input::Private;
Event event;
+ // Add event time
+ event.time = now();
static bool pickPressed[2] = {}; // HACK for tracking enter and rshift status
switch(_e.type) {
case SDL_KEYDOWN: {
diff --git a/game/joystick.hh b/game/joystick.hh
index e370668..d4ca2df 100644
--- a/game/joystick.hh
+++ b/game/joystick.hh
@@ -47,8 +47,6 @@ namespace input {
return true;
};
void addEvent(Event _event) {
- // Add event time
- _event.time = now();
// only add event if the device is assigned
if( m_assigned ) m_events.push_back(_event);
/*
|