From bb9f59e7a85d7fa41d30bc2e1a3daf31be98a425 Mon Sep 17 00:00:00 2001 From: RandomityGuy <31925790+RandomityGuy@users.noreply.github.com> Date: Thu, 22 Dec 2022 20:57:34 +0530 Subject: [PATCH] fix ui scaling and alarm sound --- src/MarbleWorld.hx | 5 +++++ src/Settings.hx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/MarbleWorld.hx b/src/MarbleWorld.hx index 07a8ec13..71252fd6 100644 --- a/src/MarbleWorld.hx +++ b/src/MarbleWorld.hx @@ -1308,11 +1308,16 @@ class MarbleWorld extends Scheduler { if (timeTravelSound == null) { var ttsnd = ResourceLoader.getResource("data/sound/timetravelactive.wav", ResourceLoader.getAudio, this.soundResources); timeTravelSound = AudioManager.playSound(ttsnd, null, true); + + if (alarmSound != null) + alarmSound.pause = true; } } else { if (timeTravelSound != null) { timeTravelSound.stop(); timeTravelSound = null; + if (alarmSound != null) + alarmSound.pause = false; } if (this.timeState.currentAttemptTime >= 3.5) { this.timeState.gameplayClock += dt; diff --git a/src/Settings.hx b/src/Settings.hx index d0e84aca..c4187a6f 100644 --- a/src/Settings.hx +++ b/src/Settings.hx @@ -346,7 +346,7 @@ class Settings { #if hl Window.getInstance().resize(optionsSettings.screenWidth, optionsSettings.screenHeight); Window.getInstance().displayMode = optionsSettings.isFullScreen ? FullscreenResize : Windowed; - uiScale = Window.getInstance().windowToPixelRatio; + uiScale = 1 / Window.getInstance().windowToPixelRatio; #end #if js Window.getInstance().propagateKeyEvents = true;