summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeVerifier.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2020-06-15 13:16:01 +0200
committerJosJuice <josjuice@gmail.com>2020-07-29 21:05:57 +0200
commit2e8c5b4521d7a483d9895cd4294acd51636046d4 (patch)
treea847010e9c63d00c23a576a0483e57510cd3bf30 /Source/Core/DiscIO/VolumeVerifier.cpp
parentb354e343a7a80cff6f7c0d038e2490cc2541c990 (diff)
DolphinQt: Show a warning when launching an NKit disc image
It is my opinion that nobody should use NKit disc images without being aware of the drawbacks of them. Since it seems like almost nobody who is using NKit disc images knows what NKit is (hmm, now how could that have happened...?), I am adding a warning to Dolphin so that you can't run NKit disc images without finding out about the drawbacks. In case someone really does want to use NKit disc images, the warning has a "Don't show this again" option. Unfortunately, I can't retroactively add the warning where it's most needed: in Dolphin 5.0, which does not support Wii NKit disc images.
Diffstat (limited to 'Source/Core/DiscIO/VolumeVerifier.cpp')
-rw-r--r--Source/Core/DiscIO/VolumeVerifier.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp
index 00e850071a..c1a2bcbd90 100644
--- a/Source/Core/DiscIO/VolumeVerifier.cpp
+++ b/Source/Core/DiscIO/VolumeVerifier.cpp
@@ -988,22 +988,18 @@ void VolumeVerifier::CheckMisc()
}
}
- if (IsDisc(m_volume.GetVolumeType()))
+ if (m_volume.IsNKit())
{
- constexpr u32 NKIT_MAGIC = 0x4E4B4954; // "NKIT"
- if (m_volume.ReadSwapped<u32>(0x200, PARTITION_NONE) == NKIT_MAGIC)
- {
- AddProblem(
- Severity::Low,
- Common::GetStringT("This disc image is in the NKit format. It is not a good dump in its "
- "current form, but it might become a good dump if converted back. "
- "The CRC32 of this file might match the CRC32 of a good dump even "
- "though the files are not identical."));
- }
-
- if (StringBeginsWith(game_id_unencrypted, "R8P"))
- CheckSuperPaperMario();
+ AddProblem(
+ Severity::Low,
+ Common::GetStringT("This disc image is in the NKit format. It is not a good dump in its "
+ "current form, but it might become a good dump if converted back. "
+ "The CRC32 of this file might match the CRC32 of a good dump even "
+ "though the files are not identical."));
}
+
+ if (IsDisc(m_volume.GetVolumeType()) && StringBeginsWith(game_id_unencrypted, "R8P"))
+ CheckSuperPaperMario();
}
void VolumeVerifier::CheckSuperPaperMario()