mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-26 22:20:41 -04:00
Add VM "I/O devices", clock, mouse as demo
This commit is contained in:
parent
c969b51dee
commit
aebcfde492
8 changed files with 151 additions and 2 deletions
src/engine
|
@ -77,7 +77,14 @@ var execute = function (sequencer, thread) {
|
|||
startBranch: function (branchNum) {
|
||||
sequencer.stepToBranch(thread, branchNum);
|
||||
},
|
||||
target: target
|
||||
target: target,
|
||||
ioQuery: function (device, func, args) {
|
||||
// Find the I/O device and execute the query/function call.
|
||||
if (runtime.ioDevices[device] && runtime.ioDevices[device][func]) {
|
||||
var devObject = runtime.ioDevices[device];
|
||||
return devObject[func].call(devObject, args);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Deal with any reported value.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue