mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-08 07:22:25 +02:00
Moving to InputEndpoint, fixing build problem
This commit is contained in:
parent
de57c3b4d6
commit
a124d3b433
2 changed files with 3 additions and 9 deletions
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue