diff options
Diffstat (limited to 'src/Ryujinx.HLE/Ui/RenderingSurfaceInfo.cs')
-rw-r--r-- | src/Ryujinx.HLE/Ui/RenderingSurfaceInfo.cs | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/Ryujinx.HLE/Ui/RenderingSurfaceInfo.cs b/src/Ryujinx.HLE/Ui/RenderingSurfaceInfo.cs index 0ba116ad..10da74ef 100644 --- a/src/Ryujinx.HLE/Ui/RenderingSurfaceInfo.cs +++ b/src/Ryujinx.HLE/Ui/RenderingSurfaceInfo.cs @@ -26,10 +26,20 @@ namespace Ryujinx.HLE.Ui public bool Equals(RenderingSurfaceInfo other) { return ColorFormat == other.ColorFormat && - Width == other.Width && - Height == other.Height && - Pitch == other.Pitch && - Size == other.Size; + Width == other.Width && + Height == other.Height && + Pitch == other.Pitch && + Size == other.Size; + } + + public override bool Equals(object obj) + { + return obj is RenderingSurfaceInfo info && Equals(info); + } + + public override int GetHashCode() + { + return BitConverter.ToInt32(BitConverter.GetBytes(((ulong)ColorFormat) ^ Width ^ Height ^ Pitch ^ Size)); } } } |