mirror of
https://github.com/DarthAffe/ScreenCapture.NET.git
synced 2025-12-12 13:28:35 +00:00
Fixed ambiguous equals in Display
This commit is contained in:
parent
2614596807
commit
2a4dbd8fe5
@ -1,5 +1,7 @@
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
|
||||
using System;
|
||||
|
||||
namespace ScreenCapture.NET;
|
||||
|
||||
/// <summary>
|
||||
@ -58,20 +60,20 @@ public readonly struct Display
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether this <see cref="Display"/> equals the given one.
|
||||
/// </summary>
|
||||
/// <param name="other">The <see cref="Display"/> to compare.</param>
|
||||
/// <returns><c>true</c> if the specified object is equal to the current object; otherwise, <c>false</c>.</returns>
|
||||
public bool Equals(Display other) => Index == other.Index;
|
||||
public bool Equals(Display other) => (Index == other.Index) && GraphicsCard.Equals(other.GraphicsCard);
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool Equals(object? obj) => obj is Display other && Equals(other);
|
||||
|
||||
/// <inheritdoc />
|
||||
public override int GetHashCode() => Index;
|
||||
|
||||
public override int GetHashCode() => HashCode.Combine(Index, GraphicsCard);
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether two <see cref="Display"/> are equal.
|
||||
/// </summary>
|
||||
|
||||
@ -26,8 +26,9 @@
|
||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
||||
|
||||
<PackageReleaseNotes>
|
||||
- Added IScreenCapture.UpdateCaptureZone to modify existing CaptureZones without having to remove and add them again.
|
||||
- Added IScreenCapture.UpdateCaptureZone to modify existing CaptureZones without having to remove and add them again.
|
||||
(This has performance benefits when only X and/or Y is changed, changes to width, height and downscale are internally still reinitializing the zone.)
|
||||
- Fixed ambiguous equals in Display
|
||||
</PackageReleaseNotes>
|
||||
|
||||
<Version>1.2.0</Version>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user