From fd7fb5d9b5a01d590d9949c71611fdf36074e008 Mon Sep 17 00:00:00 2001 From: NSGolova Date: Tue, 8 Oct 2024 17:36:54 +0100 Subject: [PATCH] BS 1.38.0 Support --- Source/2_Core/Replayer/ReplayPauseController.cs | 2 +- .../FiltersMenu/BeatmapSelector/BeatmapPreviewCell.cs | 6 ++++-- .../Components/Infos/HorizontalBeatmapLevelPreview.cs | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Source/2_Core/Replayer/ReplayPauseController.cs b/Source/2_Core/Replayer/ReplayPauseController.cs index 79dfd07e..187c6a0d 100644 --- a/Source/2_Core/Replayer/ReplayPauseController.cs +++ b/Source/2_Core/Replayer/ReplayPauseController.cs @@ -47,7 +47,7 @@ private void OnDestroy() { } private void UnsubscribeStandardEvents() { - _vrPlatformHelper.inputFocusWasCapturedEvent -= _pauseController.HandleInputFocusWasCaptured; + _vrPlatformHelper.inputFocusWasCapturedEvent -= _pauseController.HandleFocusWasCaptured; _vrPlatformHelper.hmdUnmountedEvent -= _pauseController.HandleHMDUnmounted; _pauseMenuManager.didFinishResumeAnimationEvent -= _pauseController.HandlePauseMenuManagerDidFinishResumeAnimation; _pauseMenuManager.didPressContinueButtonEvent -= _pauseController.HandlePauseMenuManagerDidPressContinueButton; diff --git a/Source/8_UI/FlowCoordinator/Components/ReplayLaunchView/SearchFiltersPanel/FiltersMenu/BeatmapSelector/BeatmapPreviewCell.cs b/Source/8_UI/FlowCoordinator/Components/ReplayLaunchView/SearchFiltersPanel/FiltersMenu/BeatmapSelector/BeatmapPreviewCell.cs index a3ed8954..e3206fdd 100644 --- a/Source/8_UI/FlowCoordinator/Components/ReplayLaunchView/SearchFiltersPanel/FiltersMenu/BeatmapSelector/BeatmapPreviewCell.cs +++ b/Source/8_UI/FlowCoordinator/Components/ReplayLaunchView/SearchFiltersPanel/FiltersMenu/BeatmapSelector/BeatmapPreviewCell.cs @@ -14,9 +14,11 @@ internal class BeatmapPreviewCell : ReeUIComponentV2 { private class NotSelectedPreviewBeatmapLevel : BeatmapLevel { private class PreviewMediaData : IPreviewMediaData { - public Task GetCoverSpriteAsync(CancellationToken cancellationToken) => Task.FromResult(BundleLoader.UnknownIcon); + public Task GetCoverSpriteAsync() => Task.FromResult(BundleLoader.UnknownIcon); - public Task GetPreviewAudioClip(CancellationToken cancellationToken) => throw new NotImplementedException(); + public Task GetPreviewAudioClip() => throw new NotImplementedException(); + + public void UnloadCoverSprite() {} public void UnloadPreviewAudioClip() { } } diff --git a/Source/8_UI/Replayer/Components/Infos/HorizontalBeatmapLevelPreview.cs b/Source/8_UI/Replayer/Components/Infos/HorizontalBeatmapLevelPreview.cs index 95fd9fe9..1dd8f1d8 100644 --- a/Source/8_UI/Replayer/Components/Infos/HorizontalBeatmapLevelPreview.cs +++ b/Source/8_UI/Replayer/Components/Infos/HorizontalBeatmapLevelPreview.cs @@ -56,8 +56,7 @@ public void SetBeatmapLevel(BeatmapLevel level) { LoadAndAssignImage(level); } private async void LoadAndAssignImage(BeatmapLevel level) { - var token = new CancellationTokenSource().Token; - _songPreviewImage.sprite = await level.previewMediaData.GetCoverSpriteAsync(token); + _songPreviewImage.sprite = await level.previewMediaData.GetCoverSpriteAsync(); } #endregion