void InputManager::clearControlStates() { while (!mControlStates.empty()) { ControlState* controller = mControlStates.top(); mControlStates.pop(); controller->pause(); mFinishedControlStates.push_back(controller); } }
void InputManager::popControlState() { ControlState* controller = mControlStates.top(); mControlStates.pop(); controller->pause(); mFinishedControlStates.push_back(controller); if (!mControlStates.empty()) { ControlState* newController = mControlStates.top(); newController->resume(); } }