Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 21, 2011, 6:58:23 PM (13 years ago)
Author:
rgrieder
Message:

Merged revisions 7978 - 8096 from kicklib to kicklib2.

Location:
code/branches/kicklib2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib2

  • code/branches/kicklib2/src/libraries/core/input/InputDevice.h

    r7271 r8284  
    184184    protected:
    185185        //! Common code for all button pressed events (updates pressed buttons list and calls the input states)
    186         FORCEINLINE void buttonPressed(ButtonTypeParam button)
     186        ORX_FORCEINLINE void buttonPressed(ButtonTypeParam button)
    187187        {
    188188            // check whether the button already is in the list (can happen when focus was lost)
     
    201201
    202202        //! Common code for all button released events (updates pressed buttons list and calls the input states)
    203         FORCEINLINE void buttonReleased(ButtonTypeParam button)
     203        ORX_FORCEINLINE void buttonReleased(ButtonTypeParam button)
    204204        {
    205205            // remove the button from the pressedButtons_ list
  • code/branches/kicklib2/src/libraries/core/input/InputManager.cc

    r8079 r8284  
    151151        assert(devices_.size() == InputDeviceEnumerator::FirstJoyStick);
    152152
     153        typedef std::pair<std::string, std::string> StringPair;
     154
    153155        // Fill parameter list
    154156        OIS::ParamList paramList;
    155157        size_t windowHnd = GraphicsManager::getInstance().getRenderWindowHandle();
    156         paramList.insert(std::make_pair("WINDOW", multi_cast<std::string>(windowHnd)));
     158        paramList.insert(StringPair("WINDOW", multi_cast<std::string>(windowHnd)));
    157159#if defined(ORXONOX_PLATFORM_WINDOWS)
    158         paramList.insert(std::make_pair("w32_keyboard", "DISCL_NONEXCLUSIVE"));
    159         paramList.insert(std::make_pair("w32_keyboard", "DISCL_FOREGROUND"));
    160         paramList.insert(std::make_pair("w32_mouse", "DISCL_FOREGROUND"));
     160        paramList.insert(StringPair("w32_keyboard", "DISCL_NONEXCLUSIVE"));
     161        paramList.insert(StringPair("w32_keyboard", "DISCL_FOREGROUND"));
     162        paramList.insert(StringPair("w32_mouse", "DISCL_FOREGROUND"));
    161163        if (exclusiveMouse_ == TriBool::True || GraphicsManager::getInstance().isFullScreen())
    162164        {
    163165            // Disable Windows key plus special keys (like play, stop, next, etc.)
    164             paramList.insert(std::make_pair("w32_keyboard", "DISCL_NOWINKEY"));
    165             paramList.insert(std::make_pair("w32_mouse", "DISCL_EXCLUSIVE"));
    166         }
    167         else
    168             paramList.insert(std::make_pair("w32_mouse", "DISCL_NONEXCLUSIVE"));
     166            paramList.insert(StringPair("w32_keyboard", "DISCL_NOWINKEY"));
     167            paramList.insert(StringPair("w32_mouse", "DISCL_EXCLUSIVE"));
     168        }
     169        else
     170            paramList.insert(StringPair("w32_mouse", "DISCL_NONEXCLUSIVE"));
    169171#elif defined(ORXONOX_PLATFORM_LINUX)
    170172        // Enabling this is probably a bad idea, but whenever orxonox crashes, the setting stays on
    171173        // Trouble might be that the Pressed event occurs a bit too often...
    172         paramList.insert(std::make_pair("XAutoRepeatOn", "true"));
     174        paramList.insert(StringPair("XAutoRepeatOn", "true"));
    173175
    174176        if (exclusiveMouse_ == TriBool::True || GraphicsManager::getInstance().isFullScreen())
    175177        {
    176178            if (CommandLineParser::getValue("keyboard_no_grab").getBool())
    177                 paramList.insert(std::make_pair("x11_keyboard_grab", "false"));
     179                paramList.insert(StringPair("x11_keyboard_grab", "false"));
    178180            else
    179                 paramList.insert(std::make_pair("x11_keyboard_grab", "true"));
    180             paramList.insert(std::make_pair("x11_mouse_grab",  "true"));
    181             paramList.insert(std::make_pair("x11_mouse_hide", "true"));
    182         }
    183         else
    184         {
    185             paramList.insert(std::make_pair("x11_keyboard_grab", "false"));
    186             paramList.insert(std::make_pair("x11_mouse_grab",  "false"));
    187             paramList.insert(std::make_pair("x11_mouse_hide", "false"));
     181                paramList.insert(StringPair("x11_keyboard_grab", "true"));
     182            paramList.insert(StringPair("x11_mouse_grab",  "true"));
     183            paramList.insert(StringPair("x11_mouse_hide", "true"));
     184        }
     185        else
     186        {
     187            paramList.insert(StringPair("x11_keyboard_grab", "false"));
     188            paramList.insert(StringPair("x11_mouse_grab",  "false"));
     189            paramList.insert(StringPair("x11_mouse_hide", "false"));
    188190        }
    189191#endif
  • code/branches/kicklib2/src/libraries/core/input/InputState.h

    r7401 r8284  
    176176    };
    177177
    178     FORCEINLINE void InputState::update(float dt)
     178    ORX_FORCEINLINE void InputState::update(float dt)
    179179    {
    180180        for (unsigned int i = 0; i < handlers_.size(); ++i)
     
    183183    }
    184184
    185     FORCEINLINE void InputState::update(float dt, unsigned int device)
     185    ORX_FORCEINLINE void InputState::update(float dt, unsigned int device)
    186186    {
    187187        switch (device)
     
    205205
    206206    template <typename EventType, class ButtonTypeParam>
    207     FORCEINLINE void InputState::buttonEvent(unsigned int device, ButtonTypeParam button)
     207    ORX_FORCEINLINE void InputState::buttonEvent(unsigned int device, ButtonTypeParam button)
    208208    {
    209209        assert(device < handlers_.size());
     
    216216    }
    217217
    218     FORCEINLINE void InputState::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
     218    ORX_FORCEINLINE void InputState::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
    219219    {
    220220        if (handlers_[mouseIndex_s] != NULL)
     
    222222    }
    223223
    224     FORCEINLINE void InputState::mouseScrolled(int abs, int rel)
     224    ORX_FORCEINLINE void InputState::mouseScrolled(int abs, int rel)
    225225    {
    226226        if (handlers_[mouseIndex_s] != NULL)
     
    228228    }
    229229
    230     FORCEINLINE void InputState::joyStickAxisMoved(unsigned int device, unsigned int axis, float value)
     230    ORX_FORCEINLINE void InputState::joyStickAxisMoved(unsigned int device, unsigned int axis, float value)
    231231    {
    232232        assert(device < handlers_.size());
Note: See TracChangeset for help on using the changeset viewer.