DolphinQt: Only show raw memory card path if it's not the default.
This commit is contained in:
parent
d11839fd64
commit
650f172637
|
@ -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
|
||||
|
|
|
@ -350,4 +350,5 @@ std::string GetMemcardPath(ExpansionInterface::Slot slot, std::optional<DiscIO::
|
|||
u16 size_mb = 0x80);
|
||||
std::string GetMemcardPath(std::string configured_filename, ExpansionInterface::Slot slot,
|
||||
std::optional<DiscIO::Region> region, u16 size_mb = 0x80);
|
||||
bool IsDefaultMemcardPathConfigured(ExpansionInterface::Slot slot);
|
||||
} // namespace Config
|
||||
|
|
|
@ -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 ||
|
||||
|
|
Loading…
Reference in New Issue