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

Method updateCardActions

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

Source from the content-addressed store, hash-verified

219}
220
221void MemoryCardSettingsWidget::updateCardActions()
222{
223 QString selectedCard = getSelectedCard();
224 const bool hasSelection = !selectedCard.isEmpty();
225
226 std::optional<AvailableMcdInfo> cardInfo = FileMcd_GetCardInfo(selectedCard.toStdString());
227 bool isPS1 = (cardInfo.has_value() ? cardInfo.value().file_type == MemoryCardFileType::PS1 : false);
228
229 m_ui.convertCard->setEnabled(hasSelection && !isPS1);
230 m_ui.renameCard->setEnabled(hasSelection);
231 m_ui.deleteCard->setEnabled(hasSelection);
232}
233
234void MemoryCardSettingsWidget::deleteCard()
235{

Callers

nothing calls this directly

Calls 3

FileMcd_GetCardInfoFunction · 0.85
isEmptyMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected