Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 22, 2010, 2:47:10 PM (15 years ago)
Author:
rgrieder
Message:

Merged remaining revisions from gamestate to gamestates2.

Location:
code/branches/gamestates2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamestates2

  • code/branches/gamestates2/src/libraries/core/input/InputManager.cc

    r6422 r6595  
    8787        , oisInputManager_(0)
    8888        , devices_(2)
    89         , mouseMode_(MouseMode::Nonexclusive)
     89        , exclusiveMouse_(TriBool::False)
    9090        , emptyState_(0)
    9191        , calibratorCallbackHandler_(0)
     
    9898
    9999        if (GraphicsManager::getInstance().isFullScreen())
    100             mouseMode_ = MouseMode::Exclusive;
     100            exclusiveMouse_ = TriBool::True;
    101101        this->loadDevices();
    102102
     
    155155        paramList.insert(std::make_pair("w32_keyboard", "DISCL_FOREGROUND"));
    156156        paramList.insert(std::make_pair("w32_mouse", "DISCL_FOREGROUND"));
    157         if (mouseMode_ == MouseMode::Exclusive || GraphicsManager::getInstance().isFullScreen())
     157        if (exclusiveMouse_ == TriBool::True || GraphicsManager::getInstance().isFullScreen())
    158158        {
    159159            // Disable Windows key plus special keys (like play, stop, next, etc.)
     
    168168        paramList.insert(std::make_pair("XAutoRepeatOn", "true"));
    169169
    170         if (mouseMode_ == MouseMode::Exclusive || GraphicsManager::getInstance().isFullScreen())
     170        if (exclusiveMouse_ == TriBool::True || GraphicsManager::getInstance().isFullScreen())
    171171        {
    172172            if (CommandLineParser::getValue("keyboard_no_grab").getBool())
     
    504504
    505505        // Check whether we have to change the mouse mode
    506         MouseMode::Value requestedMode = MouseMode::Dontcare;
     506        TriBool::Value requestedMode = TriBool::Dontcare;
    507507        std::vector<InputState*>& mouseStates = devices_[InputDeviceEnumerator::Mouse]->getStateListRef();
    508508        if (mouseStates.empty())
    509             requestedMode = MouseMode::Nonexclusive;
     509            requestedMode = TriBool::False;
    510510        else
    511             requestedMode = mouseStates.front()->getMouseMode();
    512         if (requestedMode != MouseMode::Dontcare && mouseMode_ != requestedMode)
    513         {
    514             mouseMode_ = requestedMode;
     511            requestedMode = mouseStates.front()->getMouseExclusive();
     512        if (requestedMode != TriBool::Dontcare && exclusiveMouse_ != requestedMode)
     513        {
     514            exclusiveMouse_ = requestedMode;
    515515            if (!GraphicsManager::getInstance().isFullScreen())
    516516                this->reloadInternal();
Note: See TracChangeset for help on using the changeset viewer.