From 607c194eb6bcc167b072d95196275e83cd80e9a0 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Thu, 26 Dec 2019 01:34:00 +0000 Subject: [PATCH] change the way fullscreen is done for wasm backend --- WindWasm/build.sh | 2 +- WindWasm/shell.html | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/WindWasm/build.sh b/WindWasm/build.sh index 00aa9d8..6344e12 100755 --- a/WindWasm/build.sh +++ b/WindWasm/build.sh @@ -1,6 +1,6 @@ #!/bin/sh -FLAGS="-O3 --profiling -g -s WASM_OBJECT_FILES=0 -std=c++17" +FLAGS="-O3 -s WASM_OBJECT_FILES=0 -std=c++17" mkdir -p obj for i in arm710 emubase etna windermere; do emcc -c $FLAGS -o obj/$i.o ../WindCore/$i.cpp; done diff --git a/WindWasm/shell.html b/WindWasm/shell.html index 8aec56b..b53856a 100644 --- a/WindWasm/shell.html +++ b/WindWasm/shell.html @@ -16,7 +16,7 @@ height: 305px; } img.overlay { - width: 695px; + width: 100%; position: absolute; top: 0; left: 0; @@ -26,6 +26,7 @@ canvas.emscripten { border: 0px none; background-color: black; + width: 100%; } .spinner { @@ -69,13 +70,13 @@
-
+

- +

@@ -86,6 +87,11 @@ var progressElement = document.getElementById('progress'); var spinnerElement = document.getElementById('spinner'); + function doFullscreen() { + // we need to do this ourselves so we get the cover as well + document.getElementById('canvasContainer').requestFullscreen(); + } + var Module = { preRun: [], postRun: [], -- 2.45.2