push
This commit is contained in:
8
input.cm
8
input.cm
@@ -93,13 +93,13 @@ function create_user(index, config) {
|
||||
|
||||
// Push entity onto control stack
|
||||
push: function(entity) {
|
||||
this.control_stack.push(entity)
|
||||
push(this.control_stack, entity)
|
||||
},
|
||||
|
||||
// Pop from control stack
|
||||
pop: function() {
|
||||
if (length(this.control_stack) > 1) {
|
||||
return this.control_stack.pop()
|
||||
return pop(this.control_stack)
|
||||
}
|
||||
return null
|
||||
},
|
||||
@@ -166,7 +166,7 @@ function pick_user(canon) {
|
||||
|
||||
user.active_device = canon.device_id
|
||||
if (find(user.paired_devices, canon.device_id) == null) {
|
||||
user.paired_devices.push(canon.device_id)
|
||||
push(user.paired_devices, canon.device_id)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -207,7 +207,7 @@ function configure(opts) {
|
||||
// Create users
|
||||
_users = []
|
||||
for (var i = 0; i < _config.max_users; i++) {
|
||||
_users.push(create_user(i, _config))
|
||||
push(_users, create_user(i, _config))
|
||||
}
|
||||
|
||||
_initialized = true
|
||||
|
||||
Reference in New Issue
Block a user