=================================================================== RCS file: /cvs/ports/devel/ois/patches/Attic/patch-src_linux_LinuxInputManager_cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ports/devel/ois/patches/Attic/patch-src_linux_LinuxInputManager_cpp 2010/08/22 12:37:40 1.1 +++ ports/devel/ois/patches/Attic/patch-src_linux_LinuxInputManager_cpp 2011/10/26 15:21:37 1.2 @@ -1,88 +1,58 @@ ---- src/linux/LinuxInputManager.cpp.orig Mon Jan 28 00:24:28 2008 -+++ src/linux/LinuxInputManager.cpp Mon May 31 14:19:26 2010 -@@ -22,7 +22,6 @@ restrictions: - */ - #include "linux/LinuxInputManager.h" - #include "linux/LinuxKeyboard.h" --#include "linux/LinuxJoyStickEvents.h" - #include "linux/LinuxMouse.h" - #include "OISException.h" - #include -@@ -49,8 +48,6 @@ LinuxInputManager::LinuxInputManager() : InputManager( - //--------------------------------------------------------------------------------// - LinuxInputManager::~LinuxInputManager() - { -- //Close all joysticks -- LinuxJoyStick::_clearJoys(unusedJoyStickList); - } - - //--------------------------------------------------------------------------------// -@@ -99,8 +96,6 @@ void LinuxInputManager::_parseConfigSettings( ParamLis - void LinuxInputManager::_enumerateDevices() - { - //Enumerate all attached devices -- unusedJoyStickList = LinuxJoyStick::_scanJoys(); -- joySticks = unusedJoyStickList.size(); - } - - //----------------------------------------------------------------------------// -@@ -114,9 +109,6 @@ DeviceList LinuxInputManager::freeDeviceList() - if( mouseUsed == false ) - ret.insert(std::make_pair(OISMouse, mInputSystemName)); - -- for(JoyStickInfoList::iterator i = unusedJoyStickList.begin(); i != unusedJoyStickList.end(); ++i) -- ret.insert(std::make_pair(OISJoyStick, i->vendor)); -- - return ret; - } - -@@ -127,7 +119,7 @@ int LinuxInputManager::totalDevices(Type iType) - { - case OISKeyboard: return 1; - case OISMouse: return 1; -- case OISJoyStick: return joySticks; -+ case OISJoyStick: return 0; - default: return 0; - } - } -@@ -139,7 +131,7 @@ int LinuxInputManager::freeDevices(Type iType) - { - case OISKeyboard: return keyboardUsed ? 0 : 1; - case OISMouse: return mouseUsed ? 0 : 1; -- case OISJoyStick: return (int)unusedJoyStickList.size(); -+ case OISJoyStick: return 0; - default: return 0; - } - } -@@ -180,19 +172,6 @@ Object* LinuxInputManager::createObject(InputManager * - obj = new LinuxMouse(this, bufferMode, grabMouse, hideMouse); - break; - } -- case OISJoyStick: -- { -- for(JoyStickInfoList::iterator i = unusedJoyStickList.begin(); i != unusedJoyStickList.end(); ++i) -- { -- if(vendor == "" || i->vendor == vendor) -- { -- obj = new LinuxJoyStick(this, bufferMode, *i); -- unusedJoyStickList.erase(i); -- break; -- } -- } -- break; -- } - default: - break; - } -@@ -208,11 +187,6 @@ void LinuxInputManager::destroyObject( Object* obj ) - { - if( obj ) - { -- if( obj->type() == OISJoyStick ) -- { -- unusedJoyStickList.push_back( ((LinuxJoyStick*)obj)->_getJoyInfo() ); -- } -- - delete obj; - } - } +$OpenBSD: patch-src_linux_LinuxInputManager_cpp,v 1.2 2011/10/26 15:21:37 yason Exp $ +--- src/linux/LinuxInputManager.cpp.orig Mon Aug 16 02:51:34 2010 ++++ src/linux/LinuxInputManager.cpp Fri Sep 16 16:59:56 2011 +@@ -22,7 +22,6 @@ restrictions: + */ + #include "linux/LinuxInputManager.h" + #include "linux/LinuxKeyboard.h" +-#include "linux/LinuxJoyStickEvents.h" + #include "linux/LinuxMouse.h" + #include "OISException.h" + #include +@@ -48,8 +47,6 @@ LinuxInputManager::LinuxInputManager() : InputManager( + //--------------------------------------------------------------------------------// + LinuxInputManager::~LinuxInputManager() + { +- //Close all joysticks +- LinuxJoyStick::_clearJoys(unusedJoyStickList); + } + + //--------------------------------------------------------------------------------// +@@ -92,9 +89,6 @@ void LinuxInputManager::_parseConfigSettings( ParamLis + //--------------------------------------------------------------------------------// + void LinuxInputManager::_enumerateDevices() + { +- //Enumerate all attached devices +- unusedJoyStickList = LinuxJoyStick::_scanJoys(); +- joySticks = unusedJoyStickList.size(); + } + + //----------------------------------------------------------------------------// +@@ -174,19 +168,6 @@ Object* LinuxInputManager::createObject(InputManager * + obj = new LinuxMouse(this, bufferMode, grabMouse, hideMouse); + break; + } +- case OISJoyStick: +- { +- for(JoyStickInfoList::iterator i = unusedJoyStickList.begin(); i != unusedJoyStickList.end(); ++i) +- { +- if(vendor == "" || i->vendor == vendor) +- { +- obj = new LinuxJoyStick(this, bufferMode, *i); +- unusedJoyStickList.erase(i); +- break; +- } +- } +- break; +- } + default: + break; + } +@@ -204,7 +185,6 @@ void LinuxInputManager::destroyObject( Object* obj ) + { + if( obj->type() == OISJoyStick ) + { +- unusedJoyStickList.push_back( ((LinuxJoyStick*)obj)->_getJoyInfo() ); + } + + delete obj;