mirror of
https://github.com/lubosz/overte.git
synced 2025-04-26 16:15:47 +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
examples/controllers
libraries/controllers/src/controllers
|
@ -87,4 +87,9 @@ Object.keys(Controller.Hardware).forEach(function (deviceName) {
|
|||
Object.keys(Controller.Actions).forEach(function (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
|
||||
connect(userInputMapper.data(), &UserInputMapper::hardwareChanged, [=] {
|
||||
updateMaps();
|
||||
emit hardwareChanged();
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -132,6 +132,7 @@ namespace controller {
|
|||
signals:
|
||||
void actionEvent(int action, float state);
|
||||
void inputEvent(int action, float state);
|
||||
void hardwareChanged();
|
||||
|
||||
private:
|
||||
// Update the exposed variant maps reporting active hardware
|
||||
|
|
Loading…
Reference in a new issue