N64 - only show mempack domains if the respective controller is enabled and configured with a mempak

This commit is contained in:
adelikat 2014-05-20 15:19:13 +00:00
parent a6c5a9cdb2
commit 6e4af65b99
1 changed files with 24 additions and 4 deletions

View File

@ -469,10 +469,30 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
MakeMemoryDomain("AI Register", mupen64plusApi.N64_MEMORY.AI_REG, MemoryDomain.Endian.Little);
MakeMemoryDomain("EEPROM", mupen64plusApi.N64_MEMORY.EEPROM, MemoryDomain.Endian.Little);
MakeMemoryDomain("Mempak 1", mupen64plusApi.N64_MEMORY.MEMPAK1, MemoryDomain.Endian.Little);
MakeMemoryDomain("Mempak 2", mupen64plusApi.N64_MEMORY.MEMPAK2, MemoryDomain.Endian.Little);
MakeMemoryDomain("Mempak 3", mupen64plusApi.N64_MEMORY.MEMPAK3, MemoryDomain.Endian.Little);
MakeMemoryDomain("Mempak 4", mupen64plusApi.N64_MEMORY.MEMPAK4, MemoryDomain.Endian.Little);
if (_syncSettings.Controllers[0].IsConnected &&
_syncSettings.Controllers[0].PakType == N64ControllerSettings.N64ControllerPakType.MEMORY_CARD)
{
MakeMemoryDomain("Mempak 1", mupen64plusApi.N64_MEMORY.MEMPAK1, MemoryDomain.Endian.Little);
}
if (_syncSettings.Controllers[1].IsConnected &&
_syncSettings.Controllers[1].PakType == N64ControllerSettings.N64ControllerPakType.MEMORY_CARD)
{
MakeMemoryDomain("Mempak 2", mupen64plusApi.N64_MEMORY.MEMPAK2, MemoryDomain.Endian.Little);
}
if (_syncSettings.Controllers[2].IsConnected &&
_syncSettings.Controllers[2].PakType == N64ControllerSettings.N64ControllerPakType.MEMORY_CARD)
{
MakeMemoryDomain("Mempak 3", mupen64plusApi.N64_MEMORY.MEMPAK3, MemoryDomain.Endian.Little);
}
if (_syncSettings.Controllers[3].IsConnected &&
_syncSettings.Controllers[3].PakType == N64ControllerSettings.N64ControllerPakType.MEMORY_CARD)
{
MakeMemoryDomain("Mempak 4", mupen64plusApi.N64_MEMORY.MEMPAK4, MemoryDomain.Endian.Little);
}
MemoryDomains = new MemoryDomainList(_memoryDomains);
}