diff --git a/Source/Core/Core/Config/MainSettings.cpp b/Source/Core/Core/Config/MainSettings.cpp index 85621d2f58..7ed4be23ad 100644 --- a/Source/Core/Core/Config/MainSettings.cpp +++ b/Source/Core/Core/Config/MainSettings.cpp @@ -644,4 +644,9 @@ std::string GetMemcardPath(std::string configured_filename, ExpansionInterface:: Config::GetDirectoryForRegion(Config::ToGameCubeRegion(used_region)), blocks_string, ext); } + +bool IsDefaultMemcardPathConfigured(ExpansionInterface::Slot slot) +{ + return Config::Get(GetInfoForMemcardPath(slot)).empty(); +} } // namespace Config diff --git a/Source/Core/Core/Config/MainSettings.h b/Source/Core/Core/Config/MainSettings.h index d8e682134b..197ae29688 100644 --- a/Source/Core/Core/Config/MainSettings.h +++ b/Source/Core/Core/Config/MainSettings.h @@ -350,4 +350,5 @@ std::string GetMemcardPath(ExpansionInterface::Slot slot, std::optional region, u16 size_mb = 0x80); +bool IsDefaultMemcardPathConfigured(ExpansionInterface::Slot slot); } // namespace Config diff --git a/Source/Core/DolphinQt/Settings/GameCubePane.cpp b/Source/Core/DolphinQt/Settings/GameCubePane.cpp index 0e6c19aef1..cc2b8fbe5f 100644 --- a/Source/Core/DolphinQt/Settings/GameCubePane.cpp +++ b/Source/Core/DolphinQt/Settings/GameCubePane.cpp @@ -300,14 +300,18 @@ void GameCubePane::UpdateButton(ExpansionInterface::Slot slot) { case ExpansionInterface::Slot::A: case ExpansionInterface::Slot::B: + { has_config = (device == ExpansionInterface::EXIDeviceType::MemoryCard || device == ExpansionInterface::EXIDeviceType::AGP || device == ExpansionInterface::EXIDeviceType::Microphone); - m_memcard_path_labels[slot]->setHidden(device != ExpansionInterface::EXIDeviceType::MemoryCard); - m_memcard_paths[slot]->setHidden(device != ExpansionInterface::EXIDeviceType::MemoryCard); + const bool hide_memory_card = device != ExpansionInterface::EXIDeviceType::MemoryCard || + Config::IsDefaultMemcardPathConfigured(slot); + m_memcard_path_labels[slot]->setHidden(hide_memory_card); + m_memcard_paths[slot]->setHidden(hide_memory_card); m_agp_path_labels[slot]->setHidden(device != ExpansionInterface::EXIDeviceType::AGP); m_agp_paths[slot]->setHidden(device != ExpansionInterface::EXIDeviceType::AGP); break; + } case ExpansionInterface::Slot::SP1: has_config = (device == ExpansionInterface::EXIDeviceType::Ethernet || device == ExpansionInterface::EXIDeviceType::EthernetXLink ||