summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.cpp
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2022-06-28 13:35:39 -0400
committerGitHub <noreply@github.com>2022-06-28 13:35:39 -0400
commit5d04e1e1de8248da8366f6f99ff4cdbe5467c789 (patch)
tree47ff1e96f099cef3443635b982d03e2bf1ce3f04 /Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.cpp
parente50e45f400856191eafb5f0c6044a8efbf152321 (diff)
parent8aef0015fd8903b92cf0aab8a98ee669ec97b5ef (diff)
Merge pull request #10518 from iwubcode/draw-mod
Introducing a 'GraphicsMod' system for creators
Diffstat (limited to 'Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.cpp')
-rw-r--r--Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.cpp b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.cpp
new file mode 100644
index 0000000000..5921c4a3e5
--- /dev/null
+++ b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.cpp
@@ -0,0 +1,22 @@
+// Copyright 2022 Dolphin Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "VideoCommon/GraphicsModSystem/Runtime/FBInfo.h"
+
+#include "Common/Hash.h"
+
+u32 FBInfo::CalculateHash() const
+{
+ return Common::HashAdler32(reinterpret_cast<const u8*>(this), sizeof(FBInfo));
+}
+
+bool FBInfo::operator==(const FBInfo& other) const
+{
+ return m_height == other.m_height && m_width == other.m_width &&
+ m_texture_format == other.m_texture_format;
+}
+
+bool FBInfo::operator!=(const FBInfo& other) const
+{
+ return !(*this == other);
+}