From f416b7192536d340685cf17297f1bcb02adb9baa Mon Sep 17 00:00:00 2001 From: iwubcode Date: Sat, 5 Mar 2022 00:41:14 -0600 Subject: VideoCommon: add logic to handle a GraphicsMod while Dolphin is running --- .../GraphicsModSystem/Runtime/FBInfo.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.cpp (limited to 'Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.cpp') 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(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); +} -- cgit v1.2.3