From 78528b424c86c75cf1d20dbf6973b09344f8124c Mon Sep 17 00:00:00 2001 From: LoveEevee Date: Fri, 5 Apr 2019 00:21:08 +0300 Subject: [PATCH] Fix results screen, clear drum asset --- public/src/js/scoresheet.js | 8 ++++++++ public/src/js/settings.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/public/src/js/scoresheet.js b/public/src/js/scoresheet.js index 037e7e4..9ea0240 100644 --- a/public/src/js/scoresheet.js +++ b/public/src/js/scoresheet.js @@ -193,6 +193,14 @@ class Scoresheet{ var winW = innerWidth var winH = lastHeight this.pixelRatio = window.devicePixelRatio || 1 + var resolution = settings.getItem("resolution") + if(resolution === "medium"){ + this.pixelRatio *= 0.75 + }else if(resolution === "low"){ + this.pixelRatio *= 0.5 + }else if(resolution === "lowest"){ + this.pixelRatio *= 0.25 + } winW *= this.pixelRatio winH *= this.pixelRatio var ratioX = winW / 1280 diff --git a/public/src/js/settings.js b/public/src/js/settings.js index c09bebc..b4e477e 100644 --- a/public/src/js/settings.js +++ b/public/src/js/settings.js @@ -200,7 +200,7 @@ class SettingsView{ delete this.items if(this.resolution !== settings.getItem("resolution")){ for(var i in assets.image){ - if(i.startsWith("bg_song_") || i.startsWith("bg_stage_") || i.startsWith("bg_don_")){ + if(i === "touch_drum" || i.startsWith("bg_song_") || i.startsWith("bg_stage_") || i.startsWith("bg_don_")){ URL.revokeObjectURL(assets.image[i].src) delete assets.image[i] }