summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorShawn Hoffman <godisgovernment@gmail.com>2009-02-28 22:01:58 +0000
committerShawn Hoffman <godisgovernment@gmail.com>2009-02-28 22:01:58 +0000
commitee44b2a639a4e33fd0240f89d71e83babc91857f (patch)
tree9248164ea4b45872f549c21aab188c3f4e9aea8e /Source/Core
parentc1cf2a9a9985d2c91f1009bc2fc3a5fc4f98f96d (diff)
add a simple check to keep people from using the same memcard in both slots.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2483 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinWX/Src/ConfigMain.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/Source/Core/DolphinWX/Src/ConfigMain.cpp b/Source/Core/DolphinWX/Src/ConfigMain.cpp
index 6256416bc1..292432bf40 100644
--- a/Source/Core/DolphinWX/Src/ConfigMain.cpp
+++ b/Source/Core/DolphinWX/Src/ConfigMain.cpp
@@ -671,15 +671,25 @@ void CConfigMain::ChooseMemcardPath(std::string& strMemcard, bool isSlotA)
if (!filename.empty())
{
- strMemcard = filename;
+ // also check that the path isn't used for the other memcard...
+ if (filename.compare(isSlotA ? SConfig::GetInstance().m_strMemoryCardB
+ : SConfig::GetInstance().m_strMemoryCardA) != 0)
+ {
+ strMemcard = filename;
- if (Core::GetState() != Core::CORE_UNINITIALIZED)
+ if (Core::GetState() != Core::CORE_UNINITIALIZED)
+ {
+ // Change memcard to the new file
+ ExpansionInterface::ChangeDevice(
+ isSlotA ? 0 : 1, // SlotA: channel 0, SlotB channel 1
+ isSlotA ? EXIDEVICE_MEMORYCARD_A : EXIDEVICE_MEMORYCARD_B,
+ 0); // SP1 is device 2, slots are device 0
+ }
+ }
+ else
{
- // Change memcard to the new file
- ExpansionInterface::ChangeDevice(
- (isSlotA) ? 0 : 1, // SlotA: channel 0, SlotB channel 1
- (isSlotA) ? EXIDEVICE_MEMORYCARD_A : EXIDEVICE_MEMORYCARD_B,
- 0); // SP1 is device 2, slots are device 0
+ PanicAlert("Cannot use that file as a memory card.\n"
+ "Are you trying to use the same file in both slots?");
}
}
}