mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-12 10:41:15 +00:00
Add Emscripten patches
This commit is contained in:
parent
08b029f4fa
commit
d91cff37ab
@ -1,3 +1,28 @@
|
||||
diff --git a/src/lib/libhtml5.js b/src/lib/libhtml5.js
|
||||
index da08765e7..24e5da22e 100644
|
||||
--- a/src/lib/libhtml5.js
|
||||
+++ b/src/lib/libhtml5.js
|
||||
@@ -1182,6 +1182,7 @@ var LibraryHTML5 = {
|
||||
|
||||
$registerRestoreOldStyle__deps: ['$getCanvasElementSize', '$setCanvasElementSize', '$currentFullscreenStrategy'],
|
||||
$registerRestoreOldStyle: (canvas) => {
|
||||
+ return;
|
||||
var canvasSize = getCanvasElementSize(canvas);
|
||||
var oldWidth = canvasSize[0];
|
||||
var oldHeight = canvasSize[1];
|
||||
@@ -1326,9 +1327,9 @@ var LibraryHTML5 = {
|
||||
var topMargin;
|
||||
|
||||
if (inAspectRatioFixedFullscreenMode) {
|
||||
- if (w*y < x*h) h = (w * y / x) | 0;
|
||||
- else if (w*y > x*h) w = (h * x / y) | 0;
|
||||
- topMargin = ((screenHeight - h) / 2) | 0;
|
||||
+ if (w*y < x*h) h = Math.round(w * y / x) | 0;
|
||||
+ else if (w*y > x*h) w = Math.round(h * x / y) | 0;
|
||||
+ topMargin = Math.round((screenHeight - h) / 2) | 0;
|
||||
}
|
||||
|
||||
if (inPixelPerfectFullscreenMode) {
|
||||
diff --git a/src/lib/libpthread.js b/src/lib/libpthread.js
|
||||
index 6d979627e..97e3f8684 100644
|
||||
--- a/src/lib/libpthread.js
|
||||
|
||||
Loading…
Reference in New Issue
Block a user