Skip to content

Commit

Permalink
进入新窗口播放时遵循默认播放模式 (#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
Richasy authored Sep 18, 2024
1 parent b3850c8 commit 0884c56
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/Desktop/BiliCopilot.UI/Forms/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,6 @@ private static LRESULT HookKeyboardCallback(int nCode, WPARAM wParam, LPARAM lPa
}
}

Debug.WriteLine("Keyboard Hook: " + nCode);

return PInvoke.CallNextHookEx(HHOOK.Null, nCode, wParam, lParam);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,7 @@ public virtual async Task SetPlayDataAsync(string? videoUrl, string? audioUrl, b
_smtc.ButtonPressed += OnSystemControlsButtonPressedAsync;

// 独立窗口播放时默认全窗口播放. 外置播放器播放时除外.
if (IsSeparatorWindowPlayer && !IsFullWindow && !IsExternalPlayer)
{
ToggleFullWindowCommand.Execute(default);
}
else if (!IsExternalPlayer)
if (!IsExternalPlayer)
{
var defaultDisplay = SettingsToolkit.ReadLocalSetting(SettingNames.DefaultPlayerDisplayMode, PlayerDisplayMode.Default);
if (!IsFullScreen && defaultDisplay == PlayerDisplayMode.FullScreen)
Expand Down
4 changes: 4 additions & 0 deletions src/Libs/Danmaku.Core/DanmakuFrostMaster.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
//<auto-generated/>
using Microsoft.Graphics.Canvas.Text;
using Microsoft.Graphics.Canvas.UI.Xaml;
using Microsoft.UI;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -43,6 +45,8 @@ public DanmakuFrostMaster(Grid rootGrid, LoggingChannel loggingChannel = null, A
{
rootGrid.Children.Clear();
var canvas = new CanvasAnimatedControl();
canvas.ClearColor = Colors.Transparent;
canvas.Background = new SolidColorBrush(Colors.Transparent);
rootGrid.Children.Add(canvas);
Logger.SetLogger(loggingChannel);

Expand Down

0 comments on commit 0884c56

Please sign in to comment.