mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-10 20:58:37 +02:00
Merge branch 'controllers' of https://github.com/highfidelity/hifi into controllers
This commit is contained in:
commit
07c13f4d66
3 changed files with 9 additions and 3 deletions
|
@ -87,4 +87,9 @@ Object.keys(Controller.Hardware).forEach(function (deviceName) {
|
||||||
Object.keys(Controller.Actions).forEach(function (actionName) {
|
Object.keys(Controller.Actions).forEach(function (actionName) {
|
||||||
print("Controller.Actions." + actionName + ":" + Controller.Actions[actionName]);
|
print("Controller.Actions." + actionName + ":" + Controller.Actions[actionName]);
|
||||||
});
|
});
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
Controller.hardwareChanged.connect(function () {
|
||||||
|
print("hardwareChanged");
|
||||||
|
});
|
|
@ -48,11 +48,11 @@ controller::ScriptingInterface::ScriptingInterface() {
|
||||||
connect(userInputMapper.data(), &UserInputMapper::inputEvent, this, &controller::ScriptingInterface::inputEvent);
|
connect(userInputMapper.data(), &UserInputMapper::inputEvent, this, &controller::ScriptingInterface::inputEvent);
|
||||||
|
|
||||||
// FIXME make this thread safe
|
// FIXME make this thread safe
|
||||||
connect(userInputMapper.data(), &UserInputMapper::hardwareChanged, [=] {
|
connect(userInputMapper.data(), &UserInputMapper::hardwareChanged, this, [=] {
|
||||||
updateMaps();
|
updateMaps();
|
||||||
|
emit hardwareChanged();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
qCDebug(controllers) << "Setting up standard controller abstraction";
|
qCDebug(controllers) << "Setting up standard controller abstraction";
|
||||||
_standard = createDeviceMap(userInputMapper->getStandardDevice());
|
_standard = createDeviceMap(userInputMapper->getStandardDevice());
|
||||||
|
|
||||||
|
|
|
@ -132,6 +132,7 @@ namespace controller {
|
||||||
signals:
|
signals:
|
||||||
void actionEvent(int action, float state);
|
void actionEvent(int action, float state);
|
||||||
void inputEvent(int action, float state);
|
void inputEvent(int action, float state);
|
||||||
|
void hardwareChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Update the exposed variant maps reporting active hardware
|
// Update the exposed variant maps reporting active hardware
|
||||||
|
|
Loading…
Reference in a new issue