|
From: Yoda-JM <yo...@us...> - 2009-07-12 14:41:14
|
Module: performous
Branch: master
Commit: db1865f9782f4792461f4d5279256b4cf684ab0a
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Jul 12 16:40:43 2009 +0200
Dirty fix of joystick problem
---
game/joystick.cc | 3 ++-
game/joystick.hh | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index fbd2a5f..a787e68 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -7,7 +7,8 @@ Joystick::Joystick(unsigned int _id): m_id(_id) {
m_joystick = SDL_JoystickOpen(m_id);
};
Joystick::~Joystick() {
- if(SDL_JoystickOpened(m_id)) SDL_JoystickClose(m_joystick);
+ // Do it another way :/
+ //if(SDL_JoystickOpened(m_id)) SDL_JoystickClose(m_joystick);
};
std::string Joystick::getName() const {
return std::string(SDL_JoystickName(m_id));
diff --git a/game/joystick.hh b/game/joystick.hh
index e6f4e6e..8ec4f61 100644
--- a/game/joystick.hh
+++ b/game/joystick.hh
@@ -14,7 +14,7 @@ void joysticks_init();
class Joystick {
public:
- Joystick() {};
+ Joystick() {};
Joystick(unsigned int _id);
~Joystick();
std::string getName() const;
|