settings: add "--state" (#349)
This commit is contained in:
parent
5b0588568a
commit
41dee25781
5 changed files with 35 additions and 0 deletions
|
|
@ -133,7 +133,24 @@ module.exports = {
|
|||
},
|
||||
|
||||
sessionOpened: function(data, clientId) {
|
||||
|
||||
if (settings.read('stateFile')) {
|
||||
var send = true
|
||||
for (var id in ipc.clients) {
|
||||
// only make the client send its osc state if there are no other active clients
|
||||
if (id !== clientId && ipc.clients[id].connected()) {
|
||||
send = false
|
||||
}
|
||||
}
|
||||
var state = {
|
||||
state: settings.read('stateFile'),
|
||||
send: send
|
||||
}
|
||||
ipc.send('stateLoad', state, clientId)
|
||||
}
|
||||
|
||||
ipc.send('stateSend', null, null, clientId)
|
||||
|
||||
},
|
||||
|
||||
savingSession: function(data, clientId) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue