mirror of
https://github.com/DarthAffe/ScreenCapture.NET.git
synced 2026-11-11 11:26:31 +00:00
Fixed small code issues
This commit is contained in:
1 parent
122327532b
commit
fd228af170
2 files changed
+4
-4
No files matched your search
@@ -24,12 +24,12 @@ public sealed class DX11ScreenCapture : AbstractScreenCapture<ColorBGRA>
|
|||||||
#region Constants
|
#region Constants
|
||||||
|
|
||||||
private static readonly FeatureLevel[] FEATURE_LEVELS =
|
private static readonly FeatureLevel[] FEATURE_LEVELS =
|
||||||
{
|
[
|
||||||
FeatureLevel.Level_11_1,
|
FeatureLevel.Level_11_1,
|
||||||
FeatureLevel.Level_11_0,
|
FeatureLevel.Level_11_0,
|
||||||
FeatureLevel.Level_10_1,
|
FeatureLevel.Level_10_1,
|
||||||
FeatureLevel.Level_10_0
|
FeatureLevel.Level_10_0
|
||||||
};
|
];
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ public sealed class DX11ScreenCapture : AbstractScreenCapture<ColorBGRA>
|
|||||||
private ID3D11DeviceContext? _context;
|
private ID3D11DeviceContext? _context;
|
||||||
private ID3D11Texture2D? _captureTexture;
|
private ID3D11Texture2D? _captureTexture;
|
||||||
|
|
||||||
private readonly Dictionary<CaptureZone<ColorBGRA>, ZoneTextures> _textures = new();
|
private readonly Dictionary<CaptureZone<ColorBGRA>, ZoneTextures> _textures = [];
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ public sealed class CaptureZone<TColor> : ICaptureZone
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
if (_disposed) throw new ObjectDisposedException("The lock is already released");
|
ObjectDisposedException.ThrowIf(_disposed, this);
|
||||||
|
|
||||||
Monitor.Exit(_lock);
|
Monitor.Exit(_lock);
|
||||||
_disposed = true;
|
_disposed = true;
|
||||||
|
|||||||
Reference in new issue
Block a user