mirror of
https://github.com/DarthAffe/ScreenCapture.NET.git
synced 2025-12-12 21:38:42 +00:00
Fixed small code issues
This commit is contained in:
parent
122327532b
commit
fd228af170
@ -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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user