mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 14:18:24 +02:00
emit hardwareChanged signal to scripts
This commit is contained in:
parent
45ba0645d0
commit
30f7c44f61
3 changed files with 8 additions and 1 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");
|
||||||
|
});
|
|
@ -50,6 +50,7 @@ controller::ScriptingInterface::ScriptingInterface() {
|
||||||
// FIXME make this thread safe
|
// FIXME make this thread safe
|
||||||
connect(userInputMapper.data(), &UserInputMapper::hardwareChanged, [=] {
|
connect(userInputMapper.data(), &UserInputMapper::hardwareChanged, [=] {
|
||||||
updateMaps();
|
updateMaps();
|
||||||
|
emit hardwareChanged();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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