Fix startup bug

This commit is contained in:
kichikuou
2017-04-02 19:05:20 +09:00
parent 0e4d1c764b
commit f6483900f8
2 changed files with 4 additions and 7 deletions
+4 -3
View File
@@ -86,9 +86,9 @@ namespace xsystem35 {
$('.navbar-brand').textContent = title.slice(colon + 1);
};
Module.canvas = document.getElementById('canvas');
Module.noInitialRun = true;
Module.setStatus = this.setStatus.bind(this);
Module.preRun = [
() => { Module.addRunDependency('gameFiles'); },
fsReady,
function loadFont() {
FS.createPreloadedFile('/', Font.fname, Font.url, true, false);
@@ -124,8 +124,9 @@ namespace xsystem35 {
$('#zoom').hidden = false;
$('#volume-control').hidden = false;
setTimeout(() => {
Module.callMain(Module.arguments);
this.antialiasChanged();
if (this.antialiasCheckbox.checked)
Module.arguments.push('-antialias');
Module.removeRunDependency('gameFiles');
}, 0);
}
-4
View File
@@ -49,13 +49,9 @@ declare function _ald_freedata(data: number): void;
declare function _sjis2unicode(byte1: number, byte2: number): void;
declare namespace Module {
let noInitialRun: boolean;
// Undocumented methods / attributes
let canvas: HTMLElement;
function callMain(args: string[]): void;
function getMemory(size: number): number;
function monitorRunDependencies(left: number): void;
function setStatus(status: string): void;
function setWindowTitle(title: string): void;
}