Merge branch 'controllers' of https://github.com/highfidelity/hifi into controllers

This commit is contained in:
samcake 2015-10-28 12:54:46 -07:00
commit 07c13f4d66
3 changed files with 9 additions and 3 deletions

View file

@ -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");
});

View file

@ -48,11 +48,11 @@ controller::ScriptingInterface::ScriptingInterface() {
connect(userInputMapper.data(), &UserInputMapper::inputEvent, this, &controller::ScriptingInterface::inputEvent);
// FIXME make this thread safe
connect(userInputMapper.data(), &UserInputMapper::hardwareChanged, [=] {
connect(userInputMapper.data(), &UserInputMapper::hardwareChanged, this, [=] {
updateMaps();
emit hardwareChanged();
});
qCDebug(controllers) << "Setting up standard controller abstraction";
_standard = createDeviceMap(userInputMapper->getStandardDevice());

View file

@ -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