Changeset 3288 for code/branches/core4/src/core/input/InputManager.cc
- Timestamp:
- Jul 13, 2009, 10:43:59 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core4/src/core/input/InputManager.cc
r3286 r3288 260 260 261 261 // inform all JoyStick Device Number Listeners 262 for (ObjectList<JoyStickQuantityListener>::iterator it = ObjectList<JoyStickQuantityListener>::begin(); it; ++it) 263 it->JoyStickQuantityChanged(devices_.size() - InputDeviceEnumerator::FirstJoyStick); 262 std::vector<JoyStick*> joyStickList; 263 for (unsigned int i = InputDeviceEnumerator::FirstJoyStick; i < devices_.size(); ++i) 264 joyStickList.push_back(static_cast<JoyStick*>(devices_[i])); 265 JoyStickQuantityListener::changeJoyStickQuantity(joyStickList); 264 266 } 265 267 … … 572 574 if (statesByName_.find(name) == statesByName_.end()) 573 575 { 574 InputState* state = new InputState;575 576 if (priority >= InputStatePriority::HighPriority || priority == InputStatePriority::Empty) 576 577 { … … 583 584 COUT(2) << "Warning: Could not add an InputState with the same priority '" 584 585 << static_cast<int>(priority) << "' != 0." << std::endl; 585 return false;586 return 0; 586 587 } 587 588 } 588 589 } 590 InputState* state = new InputState(name, bAlwaysGetsInput, bTransparent, priority); 589 591 statesByName_[name] = state; 590 state->JoyStickQuantityChanged(devices_.size() - InputDeviceEnumerator::FirstJoyStick);591 state->setName(name);592 state->bAlwaysGetsInput_ = bAlwaysGetsInput;593 state->bTransparent_ = bTransparent;594 if (priority >= InputStatePriority::HighPriority || priority == InputStatePriority::Empty)595 state->setPriority(priority);596 592 597 593 return state;
Note: See TracChangeset
for help on using the changeset viewer.