Fixed small code issues

This commit is contained in:
DarthAffe committed 2024-07-21 22:55:38 +02:00
1 parent 122327532b
commit fd228af170
2 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -24,12 +24,12 @@ public sealed class DX11ScreenCapture : AbstractScreenCapture<ColorBGRA>
#region Constants
private static readonly FeatureLevel[] FEATURE_LEVELS =
{
[
FeatureLevel.Level_11_1,
FeatureLevel.Level_11_0,
FeatureLevel.Level_10_1,
FeatureLevel.Level_10_0
};
];
#endregion
@@ -54,7 +54,7 @@ public sealed class DX11ScreenCapture : AbstractScreenCapture<ColorBGRA>
private ID3D11DeviceContext? _context;
private ID3D11Texture2D? _captureTexture;
private readonly Dictionary<CaptureZone<ColorBGRA>, ZoneTextures> _textures = new();
private readonly Dictionary<CaptureZone<ColorBGRA>, ZoneTextures> _textures = [];
#endregion
+1 -1
View File
@@ -204,7 +204,7 @@ public sealed class CaptureZone<TColor> : ICaptureZone
/// <inheritdoc />
public void Dispose()
{
if (_disposed) throw new ObjectDisposedException("The lock is already released");
ObjectDisposedException.ThrowIf(_disposed, this);
Monitor.Exit(_lock);
_disposed = true;