Skip to content

Commit 53ec959

Browse files
committed
CodeQA
1 parent 0578ea9 commit 53ec959

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

CollapseLauncher/Classes/Helper/ThreadPoolThrottle.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace CollapseLauncher.Helper
66
/// <summary>
77
/// Manages the thread pool settings to throttle the number of threads.
88
/// </summary>
9-
internal class ThreadPoolThrottle : IDisposable
9+
internal partial class ThreadPoolThrottle : IDisposable
1010
{
1111
private readonly int PreviousThreadCount;
1212
private readonly int PreviousCompletionPortThreadCount;

CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/ZenlessGameSettingsPage.xaml.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,14 @@ private System.Drawing.Size GetNativeDefaultResolution()
227227
// Tested on both 3840x2160 and 1920x1080 screen. The game keeps to only accept
228228
// the resolution where width <= 2560 as its default resolution.
229229
// In other scenario, if the screen has selection with width > 2569 but does
230-
// not have have one with width == 2560, the game will keep to use the
230+
// not have one with width == 2560, the game will keep to use the
231231
// resolution that has the width of 2560, like.... WTF?????
232232
// HOYOOOOOOO!!!!!!!
233233

234234
// Get the list of available resolutions. Otherwise, throw an exception.
235-
var currentAcceptedRes = ScreenProp.EnumerateScreenSizes().ToList()
236-
?? throw new NullReferenceException("Cannot get screen resolution. Prolly the app cannot communicate with Win32 API???");
235+
var currentAcceptedRes = ScreenProp.EnumerateScreenSizes().ToList();
236+
if (currentAcceptedRes.Count == 0)
237+
throw new NullReferenceException("Cannot get screen resolution. Prolly the app cannot communicate with Win32 API???");
237238
var maxAcceptedResW = currentAcceptedRes.Max(x => x.Width); // Find the maximum resolution width that can be accepted.
238239

239240
// If the max accepted resolution width is more than or equal to maxAcceptedNativeW,

Hi3Helper.CommunityToolkit/SettingsControls/Helpers/StyleExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Hi3Helper.CommunityToolkit.WinUI.Controls;
66

77
// Adapted from https://github.com/rudyhuyn/XamlPlus
8-
public static class StyleExtensions
8+
public static partial class StyleExtensions
99
{
1010
// Used to distinct normal ResourceDictionary and the one we add.
1111
private sealed class StyleExtensionResourceDictionary : ResourceDictionary

0 commit comments

Comments
 (0)