[BACK]Return to patch-src_linux_LinuxInputManager_cpp CVS log [TXT][DIR] Up to [local] / ports / devel / ois / patches

Annotation of ports/devel/ois/patches/patch-src_linux_LinuxInputManager_cpp, Revision 1.1.1.1

1.1       yason       1: --- src/linux/LinuxInputManager.cpp.orig       Mon Jan 28 00:24:28 2008
                      2: +++ src/linux/LinuxInputManager.cpp    Mon May 31 14:19:26 2010
                      3: @@ -22,7 +22,6 @@ restrictions:
                      4:  */
                      5:  #include "linux/LinuxInputManager.h"
                      6:  #include "linux/LinuxKeyboard.h"
                      7: -#include "linux/LinuxJoyStickEvents.h"
                      8:  #include "linux/LinuxMouse.h"
                      9:  #include "OISException.h"
                     10:  #include <cstdlib>
                     11: @@ -49,8 +48,6 @@ LinuxInputManager::LinuxInputManager() : InputManager(
                     12:  //--------------------------------------------------------------------------------//
                     13:  LinuxInputManager::~LinuxInputManager()
                     14:  {
                     15: -      //Close all joysticks
                     16: -      LinuxJoyStick::_clearJoys(unusedJoyStickList);
                     17:  }
                     18:
                     19:  //--------------------------------------------------------------------------------//
                     20: @@ -99,8 +96,6 @@ void LinuxInputManager::_parseConfigSettings( ParamLis
                     21:  void LinuxInputManager::_enumerateDevices()
                     22:  {
                     23:        //Enumerate all attached devices
                     24: -      unusedJoyStickList = LinuxJoyStick::_scanJoys();
                     25: -      joySticks = unusedJoyStickList.size();
                     26:  }
                     27:
                     28:  //----------------------------------------------------------------------------//
                     29: @@ -114,9 +109,6 @@ DeviceList LinuxInputManager::freeDeviceList()
                     30:        if( mouseUsed == false )
                     31:                ret.insert(std::make_pair(OISMouse, mInputSystemName));
                     32:
                     33: -      for(JoyStickInfoList::iterator i = unusedJoyStickList.begin(); i != unusedJoyStickList.end(); ++i)
                     34: -              ret.insert(std::make_pair(OISJoyStick, i->vendor));
                     35: -
                     36:        return ret;
                     37:  }
                     38:
                     39: @@ -127,7 +119,7 @@ int LinuxInputManager::totalDevices(Type iType)
                     40:        {
                     41:        case OISKeyboard: return 1;
                     42:        case OISMouse: return 1;
                     43: -      case OISJoyStick: return joySticks;
                     44: +      case OISJoyStick: return 0;
                     45:        default: return 0;
                     46:        }
                     47:  }
                     48: @@ -139,7 +131,7 @@ int LinuxInputManager::freeDevices(Type iType)
                     49:        {
                     50:        case OISKeyboard: return keyboardUsed ? 0 : 1;
                     51:        case OISMouse: return mouseUsed ? 0 : 1;
                     52: -      case OISJoyStick: return (int)unusedJoyStickList.size();
                     53: +      case OISJoyStick: return 0;
                     54:        default: return 0;
                     55:        }
                     56:  }
                     57: @@ -180,19 +172,6 @@ Object* LinuxInputManager::createObject(InputManager *
                     58:                        obj = new LinuxMouse(this, bufferMode, grabMouse, hideMouse);
                     59:                break;
                     60:        }
                     61: -      case OISJoyStick:
                     62: -      {
                     63: -              for(JoyStickInfoList::iterator i = unusedJoyStickList.begin(); i != unusedJoyStickList.end(); ++i)
                     64: -              {
                     65: -                      if(vendor == "" || i->vendor == vendor)
                     66: -                      {
                     67: -                              obj = new LinuxJoyStick(this, bufferMode, *i);
                     68: -                              unusedJoyStickList.erase(i);
                     69: -                              break;
                     70: -                      }
                     71: -              }
                     72: -              break;
                     73: -      }
                     74:        default:
                     75:                break;
                     76:        }
                     77: @@ -208,11 +187,6 @@ void LinuxInputManager::destroyObject( Object* obj )
                     78:  {
                     79:        if( obj )
                     80:        {
                     81: -              if( obj->type() == OISJoyStick )
                     82: -              {
                     83: -                      unusedJoyStickList.push_back( ((LinuxJoyStick*)obj)->_getJoyInfo() );
                     84: -              }
                     85: -
                     86:                delete obj;
                     87:        }
                     88:  }

CVSweb