From ddb52d890c03accef7625db147ae76dc98017801 Mon Sep 17 00:00:00 2001 From: Daniel Brooks Date: Tue, 27 Jan 2015 17:04:31 -0800 Subject: [PATCH] let the config file tell emscripten where ancillary files are --- emdosbox-loader.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/emdosbox-loader.js b/emdosbox-loader.js index 7e00054..dab29b0 100644 --- a/emdosbox-loader.js +++ b/emdosbox-loader.js @@ -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")