Fixed leak + blindly try to fix disabling devices not working as seemed to be reported

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8534 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2011-05-08 00:56:09 +00:00
parent 1e2dc94c18
commit 4c2d0215a0

View File

@ -102,6 +102,7 @@ GamePadDevice::~GamePadDevice()
{
delete[] m_prevAxisDirections;
delete[] m_prevAxisValue;
delete[] m_axis_ok;
// FIXME - any need to close devices?
} // ~GamePadDevice
@ -154,6 +155,8 @@ bool GamePadDevice::processAndMapInput(Input::InputType type, const int id, cons
StateManager::ActivePlayer* player,
PlayerAction* action /* out */)
{
if (!m_configuration->isEnabled()) return false;
bool success = false;
if(m_prevAxisDirections == NULL) return false; // device not open