diff --git a/Assets/Misc/BuildTimestamp.txt b/Assets/Misc/BuildTimestamp.txt index 60133a2..0aa12ff 100644 --- a/Assets/Misc/BuildTimestamp.txt +++ b/Assets/Misc/BuildTimestamp.txt @@ -1 +1 @@ -638293053009126639 \ No newline at end of file +638293106792303315 \ No newline at end of file diff --git a/Assets/Misc/ChangeLog.txt b/Assets/Misc/ChangeLog.txt index 56961e1..9c2ff17 100644 --- a/Assets/Misc/ChangeLog.txt +++ b/Assets/Misc/ChangeLog.txt @@ -17,6 +17,7 @@ - 现在鼠标悬浮在背景上时也可以取消选中物件了 - 现在使用撤销可以取消正在进行的操作了 - 调整了实际渲染时的谱面流速 +- 修复在高 dpi 屏幕上窗口大小设置错误的问题 - 调整了部分滚动条对滚轮操作的灵敏度 - 改用 URP 进行渲染, 可能会带来性能提升 - 修复较高分辨率下轨道的微小渲染问题 \ No newline at end of file diff --git a/Assets/Scripts/Compose/ArcadeComposeManager.cs b/Assets/Scripts/Compose/ArcadeComposeManager.cs index 2783312..c805e8a 100644 --- a/Assets/Scripts/Compose/ArcadeComposeManager.cs +++ b/Assets/Scripts/Compose/ArcadeComposeManager.cs @@ -288,7 +288,7 @@ private void CheckScroll() if (timing > GameplayManager.Length) timing = GameplayManager.Length; if (timing < 0) timing = 0; - if (GameplayManager.Timing != Mathf.RoundToInt(timing) ) + if (GameplayManager.Timing != Mathf.RoundToInt(timing)) { GameplayManager.Timing = Mathf.RoundToInt(timing); GameplayManager.ResetJudge(); @@ -361,10 +361,16 @@ public void SetResolution(string resolution, bool fullscreen) Screen.SetResolution(Screen.currentResolution.width, Screen.currentResolution.height, FullScreenMode.FullScreenWindow); return; } + Debug.Log($"[dpi]{Screen.dpi}"); + float scaleRatio = Screen.dpi / 96f; + if (scaleRatio <= 0.01f) + { + scaleRatio = 1f; + } // here we do not check format of string string[] dimensions = resolution.Split('x'); - int width = int.Parse(dimensions[0]); - int height = int.Parse(dimensions[1]); + int width = Mathf.RoundToInt(int.Parse(dimensions[0]) * scaleRatio); + int height = Mathf.RoundToInt(int.Parse(dimensions[1]) * scaleRatio); Screen.SetResolution(width, height, FullScreenMode.Windowed); } public void SetTargetFramerate(int fps) diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 3538ccf..fa5893a 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -20,7 +20,7 @@ PlayerSettings: m_ShowUnitySplashScreen: 1 m_ShowUnitySplashLogo: 1 m_SplashScreenOverlayOpacity: 1 - m_SplashScreenAnimation: 1 + m_SplashScreenAnimation: 0 m_SplashScreenLogoStyle: 1 m_SplashScreenDrawMode: 1 m_SplashScreenBackgroundAnimationZoom: 0 @@ -40,7 +40,7 @@ PlayerSettings: width: 1 height: 1 m_SplashScreenLogos: - - logo: {fileID: 10404, guid: 0000000000000000e000000000000000, type: 0} + - logo: {fileID: 10404, guid: 0000000000000000f000000000000000, type: 0} duration: 2 m_VirtualRealitySplashScreen: {fileID: 0} m_HolographicTrackingLossScreen: {fileID: 0}