mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 16:23:17 +02:00
fixing initialization in switch statement
This commit is contained in:
parent
20487b2ad1
commit
7b51061b5f
1 changed files with 2 additions and 2 deletions
|
@ -4047,6 +4047,7 @@ void Application::keyPressEvent(QKeyEvent* event) {
|
||||||
_keysPressed.insert(event->key(), *event);
|
_keysPressed.insert(event->key(), *event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto audioScriptingInterface = reinterpret_cast<scripting::Audio*>(DependencyManager::get<AudioScriptingInterface>().data());
|
||||||
_controllerScriptingInterface->emitKeyPressEvent(event); // send events to any registered scripts
|
_controllerScriptingInterface->emitKeyPressEvent(event); // send events to any registered scripts
|
||||||
// if one of our scripts have asked to capture this event, then stop processing it
|
// if one of our scripts have asked to capture this event, then stop processing it
|
||||||
if (_controllerScriptingInterface->isKeyCaptured(event) || isInterstitialMode()) {
|
if (_controllerScriptingInterface->isKeyCaptured(event) || isInterstitialMode()) {
|
||||||
|
@ -4215,7 +4216,6 @@ void Application::keyPressEvent(QKeyEvent* event) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::Key_T:
|
case Qt::Key_T:
|
||||||
auto audioScriptingInterface = reinterpret_cast<scripting::Audio*>(DependencyManager::get<AudioScriptingInterface>().data());
|
|
||||||
audioScriptingInterface->setPushingToTalk(true);
|
audioScriptingInterface->setPushingToTalk(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -4325,9 +4325,9 @@ void Application::keyReleaseEvent(QKeyEvent* event) {
|
||||||
_keyboardMouseDevice->keyReleaseEvent(event);
|
_keyboardMouseDevice->keyReleaseEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto audioScriptingInterface = reinterpret_cast<scripting::Audio*>(DependencyManager::get<AudioScriptingInterface>().data());
|
||||||
switch (event->key()) {
|
switch (event->key()) {
|
||||||
case Qt::Key_T:
|
case Qt::Key_T:
|
||||||
auto audioScriptingInterface = reinterpret_cast<scripting::Audio*>(DependencyManager::get<AudioScriptingInterface>().data());
|
|
||||||
audioScriptingInterface->setPushingToTalk(false);
|
audioScriptingInterface->setPushingToTalk(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue