mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 09:44:21 +02:00
fixing more connexion problems
This commit is contained in:
parent
54f64b62eb
commit
4c7c2e9390
1 changed files with 11 additions and 7 deletions
|
@ -892,9 +892,10 @@ void ConnexionClient::init() {
|
|||
ConnexionClientControl(fConnexionClientID, kConnexionCtlSetSwitches, kConnexionSwitchesDisabled, NULL);
|
||||
|
||||
if (Is3dmouseAttached() && connexiondata.getDeviceID() == 0) {
|
||||
connexiondata.registerToUserInputMapper(*Application::getUserInputMapper());
|
||||
connexiondata.assignDefaultInputMapping(*Application::getUserInputMapper());
|
||||
UserActivityLogger::getInstance().connectedDevice("controller", "3Dconnexion");
|
||||
auto userInputMapper = DependencyManager::get<UserInputMapper>();
|
||||
connexiondata.registerToUserInputMapper(*userInputMapper);
|
||||
connexiondata.assignDefaultInputMapping(*userInputMapper);
|
||||
UserActivityLogger::getInstance().connectedDevice("controller", "3Dconnexion");
|
||||
}
|
||||
//let one axis be dominant
|
||||
//ConnexionClientControl(fConnexionClientID, kConnexionCtlSetSwitches, kConnexionSwitchDominant | kConnexionSwitchEnableAll, NULL);
|
||||
|
@ -912,7 +913,8 @@ void ConnexionClient::destroy() {
|
|||
fConnexionClientID = 0;
|
||||
ConnexionData& connexiondata = ConnexionData::getInstance();
|
||||
if (connexiondata.getDeviceID()!=0) {
|
||||
Application::getUserInputMapper()->removeDevice(connexiondata.getDeviceID());
|
||||
auto userInputMapper = DependencyManager::get<UserInputMapper>();
|
||||
userInputMapper->removeDevice(connexiondata.getDeviceID());
|
||||
connexiondata.setDeviceID(0);
|
||||
}
|
||||
}
|
||||
|
@ -922,8 +924,9 @@ void DeviceAddedHandler(unsigned int connection) {
|
|||
ConnexionData& connexiondata = ConnexionData::getInstance();
|
||||
if (connexiondata.getDeviceID() == 0) {
|
||||
qCWarning(interfaceapp) << "3Dconnexion device added ";
|
||||
connexiondata.registerToUserInputMapper(*Application::getUserInputMapper());
|
||||
connexiondata.assignDefaultInputMapping(*Application::getUserInputMapper());
|
||||
auto userInputMapper = DependencyManager::get<UserInputMapper>();
|
||||
connexiondata.registerToUserInputMapper(*userInputMapper);
|
||||
connexiondata.assignDefaultInputMapping(*userInputMapper);
|
||||
UserActivityLogger::getInstance().connectedDevice("controller", "3Dconnexion");
|
||||
}
|
||||
}
|
||||
|
@ -932,7 +935,8 @@ void DeviceRemovedHandler(unsigned int connection) {
|
|||
ConnexionData& connexiondata = ConnexionData::getInstance();
|
||||
if (connexiondata.getDeviceID() != 0) {
|
||||
qCWarning(interfaceapp) << "3Dconnexion device removed";
|
||||
Application::getUserInputMapper()->removeDevice(connexiondata.getDeviceID());
|
||||
auto userInputMapper = DependencyManager::get<UserInputMapper>();
|
||||
userInputMapper->removeDevice(connexiondata.getDeviceID());
|
||||
connexiondata.setDeviceID(0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue