let the config file tell emscripten where ancillary files are

This commit is contained in:
Daniel Brooks
2015-01-27 17:09:01 -08:00
parent b2eadbaeb0
commit ddb52d890c
+6
View File
@@ -199,6 +199,12 @@ function DOSBOX(canvas, module, game, precallback, callback, scale) {
// isolating keyboard input to the canvas.
keyboardListeningElement: canvas,
noInitialRun: false,
locateFile: function (file) {
if ("file_locations" in modulecfg && file in modulecfg.file_locations) {
return get_js_url(modulecfg.file_locations[file]);
}
throw new Error("Don't know how to find file: "+ file);
},
preInit: function() {
Module.arguments = build_dosbox_arguments(modulecfg,
meta_file.getElementsByTagName("emulator_start")