From 6e4af65b994800f53dcad2a31c47c70ee1a5edc8 Mon Sep 17 00:00:00 2001 From: adelikat Date: Tue, 20 May 2014 15:19:13 +0000 Subject: [PATCH] N64 - only show mempack domains if the respective controller is enabled and configured with a mempak --- .../Consoles/Nintendo/N64/N64.cs | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs index 1f5dfa2fd3..84a7790068 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs @@ -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); }