MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / refresh

Method refresh

pcsx2-qt/Settings/MemoryCardSettingsWidget.cpp:338–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336}
337
338void MemoryCardSettingsWidget::refresh()
339{
340 const bool perGame = dialog()->isPerGameSettings();
341
342 for (u32 slot = 0; slot < static_cast<u32>(m_slots.size()); slot++)
343 {
344 const bool enabled = m_slots[slot].enable->isChecked();
345 const std::string slotKey = getSlotFilenameKey(slot);
346 const std::optional<std::string> name(
347 dialog()->getEffectiveStringValue(CONFIG_SECTION, slotKey.c_str(), FileMcd_GetDefaultName(slot).c_str()));
348 const bool inherited = perGame ? !dialog()->containsSettingValue(CONFIG_SECTION, slotKey.c_str()) : false;
349
350 m_slots[slot].slot->setCard(name, inherited);
351 m_slots[slot].slot->setEnabled(enabled);
352 m_slots[slot].eject->setEnabled(enabled);
353 }
354
355 m_ui.cardList->refresh(dialog());
356 updateCardActions();
357}
358
359void MemoryCardSettingsWidget::swapCards()
360{

Callers

nothing calls this directly

Calls 15

getSlotFilenameKeyFunction · 0.85
FileMcd_GetDefaultNameFunction · 0.85
getCardIconFunction · 0.85
getSizeSummaryFunction · 0.85
isPerGameSettingsMethod · 0.80
containsSettingValueMethod · 0.80
setCardMethod · 0.80
clearFunction · 0.50
findFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected