Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 4, 2009, 12:26:05 AM (15 years ago)
Author:
rgrieder
Message:

Applied ScopedSingletonManager to KeyBinderManager and KeyDetector.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/libraries/core/input/InputManager.cc

    r5863 r5869  
    5353
    5454#include "InputBuffer.h"
    55 #include "KeyDetector.h"
    5655#include "JoyStick.h"
    5756#include "JoyStickQuantityListener.h"
     
    9089        , bExclusiveMouse_(false)
    9190        , emptyState_(0)
    92         , keyDetector_(0)
    9391        , calibratorCallbackHandler_(0)
    9492    {
     
    105103        emptyState_->setHandler(&InputHandler::EMPTY);
    106104        activeStates_[emptyState_->getPriority()] = emptyState_;
    107 
    108         // KeyDetector to evaluate a pressed key's name
    109         InputState* detector = createInputState("detector", false, false, InputStatePriority::Detector);
    110         // Create a callback to avoid buttonHeld events after the key has been detected
    111         detector->setLeaveFunctor(createFunctor(&InputManager::clearBuffers, this));
    112         keyDetector_ = new KeyDetector();
    113         detector->setHandler(keyDetector_);
    114105
    115106        // Joy stick calibration helper callback
     
    274265
    275266        // Destroy calibrator helper handler and state
    276         keyDetector_->destroy();
    277267        this->destroyState("calibrator");
    278268        // Destroy KeyDetector and state
    279269        calibratorCallbackHandler_->destroy();
    280         this->destroyState("detector");
    281270        // destroy the empty InputState
    282271        this->destroyStateInternal(this->emptyState_);
Note: See TracChangeset for help on using the changeset viewer.