use 100% max zoom for "auto" zoom

This commit is contained in:
e7d 2020-09-07 09:11:16 +02:00
parent 65c06edd1a
commit b0f4eb2234
No known key found for this signature in database
GPG Key ID: F320BE007C0B8881

View File

@ -723,10 +723,11 @@ class Gamepad {
this.zoomMode = level === "auto" ? "auto" : "manual"; this.zoomMode = level === "auto" ? "auto" : "manual";
if (level === "auto") { if (level === "auto") {
// "auto" means a "contained" in frame zoom // "auto" means a "contained in window" zoom, with a max zoom of 1
this.zoomLevel = Math.min( this.zoomLevel = Math.min(
window.innerWidth / this.$gamepad.width(), window.innerWidth / this.$gamepad.width(),
window.innerHeight / this.$gamepad.height() window.innerHeight / this.$gamepad.height(),
1
); );
} else if (level === 0) { } else if (level === 0) {
// 0 means a zoom reset // 0 means a zoom reset