diff --git a/src/platform/qt/LoadSaveState.cpp b/src/platform/qt/LoadSaveState.cpp index 87a355497..bede2ffc8 100644 --- a/src/platform/qt/LoadSaveState.cpp +++ b/src/platform/qt/LoadSaveState.cpp @@ -83,6 +83,7 @@ void LoadSaveState::loadState(int slot) { GBAThread* thread = m_controller->thread(); VFile* vf = GBAGetState(thread->gba, thread->stateDir, slot, false); if (!vf) { + m_slots[slot - 1]->setText(tr("Empty")); return; } VFileDevice vdev(vf); diff --git a/src/platform/qt/SavestateButton.cpp b/src/platform/qt/SavestateButton.cpp index 6c04f3714..28f2bf57f 100644 --- a/src/platform/qt/SavestateButton.cpp +++ b/src/platform/qt/SavestateButton.cpp @@ -24,10 +24,14 @@ void SavestateButton::paintEvent(QPaintEvent*) { painter.setBrush(grad); painter.drawRect(frame); painter.setPen(Qt::NoPen); - painter.drawPixmap(full, icon().pixmap(full.size())); + if (!icon().isNull()) { + painter.drawPixmap(full, icon().pixmap(full.size())); + } if (hasFocus()) { QColor highlight = palette.color(QPalette::Highlight); highlight.setAlpha(128); painter.fillRect(full, highlight); } + painter.setPen(QPen(palette.text(), 0)); + painter.drawText(full, Qt::AlignCenter, text()); }