Moving to InputEndpoint, fixing build problem

This commit is contained in:
Brad Davis 2015-10-20 22:00:16 -07:00
parent de57c3b4d6
commit a124d3b433
2 changed files with 3 additions and 9 deletions

View file

@ -629,12 +629,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) :
auto userInputMapper = DependencyManager::get<UserInputMapper>();
connect(userInputMapper.data(), &UserInputMapper::actionEvent, _controllerScriptingInterface, &ControllerScriptingInterface::actionEvent);
connect(userInputMapper.data(), &UserInputMapper::actionEvent, [this](int action, float state) {
if (state) {
switch (action) {
case controller::Action::TOGGLE_MUTE:
DependencyManager::get<AudioClient>()->toggleMute();
break;
}
if (state && action == toInt(controller::Action::TOGGLE_MUTE)) {
DependencyManager::get<AudioClient>()->toggleMute();
}
});

View file

@ -255,9 +255,7 @@ void UserInputMapper::registerDevice(InputDevice* device) {
} else if (input.device == ACTIONS_DEVICE) {
endpoint = std::make_shared<ActionEndpoint>(input);
} else {
endpoint = std::make_shared<LambdaEndpoint>([=] {
return proxy->getValue(input, 0);
});
endpoint = std::make_shared<InputEndpoint>(input);
}
_inputsByEndpoint[endpoint] = input;
_endpointsByInput[input] = endpoint;