summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeDisc.cpp
diff options
context:
space:
mode:
authorMarkus Wick <degasus@users.noreply.github.com>2020-07-30 12:19:41 +0200
committerGitHub <noreply@github.com>2020-07-30 12:19:41 +0200
commit9d44df0f0bd8076df89077a2a8cd650ddd798dc5 (patch)
treee9a1d74c418366f2e1e19e851ff0cbfb24710471 /Source/Core/DiscIO/VolumeDisc.cpp
parent3d680ff2f68a52c8330de4f70620b5a0d30e3fdd (diff)
parent2e8c5b4521d7a483d9895cd4294acd51636046d4 (diff)
Merge pull request #8875 from JosJuice/nkit-warning
DolphinQt: Show a warning when launching an NKit disc image
Diffstat (limited to 'Source/Core/DiscIO/VolumeDisc.cpp')
-rw-r--r--Source/Core/DiscIO/VolumeDisc.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/DiscIO/VolumeDisc.cpp b/Source/Core/DiscIO/VolumeDisc.cpp
index bf622bb8fb..fed82a8067 100644
--- a/Source/Core/DiscIO/VolumeDisc.cpp
+++ b/Source/Core/DiscIO/VolumeDisc.cpp
@@ -84,4 +84,10 @@ std::optional<u8> VolumeDisc::GetDiscNumber(const Partition& partition) const
return ReadSwapped<u8>(6, partition);
}
+bool VolumeDisc::IsNKit() const
+{
+ constexpr u32 NKIT_MAGIC = 0x4E4B4954; // "NKIT"
+ return ReadSwapped<u32>(0x200, PARTITION_NONE) == NKIT_MAGIC;
+}
+
} // namespace DiscIO