mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-10-12 00:58:27 +03:00
Fix startup bug
This commit is contained in:
+4
-3
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user