Skip to content
Permalink
Browse files

for MAME, put the extraArgs before the args for peripherals

Some arguments that you might put in extraArgs will add or remove
peripherals, and attempting to use those newly added peripherals
silently fails if we try to use them before they've been added.
  • Loading branch information
db48x committed Jan 24, 2020
1 parent e7fca84 commit aaf75f58380a6b2ace206d053d5c88d38d29dad6
Showing with 8 additions and 8 deletions.
  1. +8 −8 loader.js
@@ -914,6 +914,14 @@ var Module = null;
args.push('-samplerate', sample_rate);
}

if (autoboot) {
args.push('-autoboot_command', autoboot+'\\n', '-autoboot_delay', '2');
}

if (extra_args) {
args = args.concat(extra_args);
}

if (peripheral) {
for (var p in peripheral) {
if (Object.prototype.propertyIsEnumerable.call(peripheral, p)) {
@@ -923,14 +931,6 @@ var Module = null;
}
}

if (autoboot) {
args.push('-autoboot_command', autoboot+'\\n', '-autoboot_delay', '2');
}

if (extra_args) {
args = args.concat(extra_args);
}

return args;
};

0 comments on commit aaf75f5

Please sign in to comment.
You can’t perform that action at this time.