mirror of https://github.com/Treeki/WindEmu.git
change the way fullscreen is done for wasm backend
This commit is contained in:
parent
621d21abe7
commit
607c194eb6
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/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
|
mkdir -p obj
|
||||||
for i in arm710 emubase etna windermere; do emcc -c $FLAGS -o obj/$i.o ../WindCore/$i.cpp; done
|
for i in arm710 emubase etna windermere; do emcc -c $FLAGS -o obj/$i.o ../WindCore/$i.cpp; done
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
height: 305px;
|
height: 305px;
|
||||||
}
|
}
|
||||||
img.overlay {
|
img.overlay {
|
||||||
width: 695px;
|
width: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -26,6 +26,7 @@
|
||||||
canvas.emscripten {
|
canvas.emscripten {
|
||||||
border: 0px none;
|
border: 0px none;
|
||||||
background-color: black;
|
background-color: black;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spinner {
|
.spinner {
|
||||||
|
@ -69,13 +70,13 @@
|
||||||
<div class="emscripten">
|
<div class="emscripten">
|
||||||
<progress value="0" max="100" id="progress" hidden=1></progress>
|
<progress value="0" max="100" id="progress" hidden=1></progress>
|
||||||
</div>
|
</div>
|
||||||
<div class="emscripten_border">
|
<div class="emscripten_border" id='canvasContainer'>
|
||||||
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" tabindex=-1></canvas>
|
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" tabindex=-1></canvas>
|
||||||
<img src='cover.svg' class='overlay'>
|
<img src='cover.svg' class='overlay'>
|
||||||
</div>
|
</div>
|
||||||
<hr/>
|
<hr/>
|
||||||
<div class="emscripten">
|
<div class="emscripten">
|
||||||
<input type="button" value="Fullscreen" onclick="Module.requestFullscreen(false, false)">
|
<input type="button" value="Fullscreen" onclick="doFullscreen()">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
@ -86,6 +87,11 @@
|
||||||
var progressElement = document.getElementById('progress');
|
var progressElement = document.getElementById('progress');
|
||||||
var spinnerElement = document.getElementById('spinner');
|
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 = {
|
var Module = {
|
||||||
preRun: [],
|
preRun: [],
|
||||||
postRun: [],
|
postRun: [],
|
||||||
|
|
Loading…
Reference in New Issue