mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 07:09:48 -06:00
Merge pull request #7169 from Techjar/qt-memcard-creation
Qt/GameCubePane: Fix inability to create new memory card file
This commit is contained in:
@ -167,17 +167,19 @@ void GameCubePane::OnConfigPressed(int slot)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString filename =
|
QString filename = QFileDialog::getSaveFileName(
|
||||||
QFileDialog::getOpenFileName(this, tr("Choose a file to open"),
|
this, tr("Choose a file to open"), QString::fromStdString(File::GetUserPath(D_GCUSER_IDX)),
|
||||||
QString::fromStdString(File::GetUserPath(D_GCUSER_IDX)), filter);
|
filter, 0, QFileDialog::DontConfirmOverwrite);
|
||||||
|
|
||||||
if (filename.isEmpty() || !File::Exists(filename.toStdString()))
|
if (filename.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QString path_abs = QFileInfo(filename).absoluteFilePath();
|
QString path_abs = QFileInfo(filename).absoluteFilePath();
|
||||||
|
|
||||||
// Memcard validity checks
|
// Memcard validity checks
|
||||||
if (memcard)
|
if (memcard)
|
||||||
|
{
|
||||||
|
if (File::Exists(filename.toStdString()))
|
||||||
{
|
{
|
||||||
GCMemcard mc(filename.toStdString());
|
GCMemcard mc(filename.toStdString());
|
||||||
|
|
||||||
@ -190,6 +192,7 @@ void GameCubePane::OnConfigPressed(int slot)
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool other_slot_memcard =
|
bool other_slot_memcard =
|
||||||
m_slot_combos[slot == 0 ? SLOT_B_INDEX : SLOT_A_INDEX]->currentIndex() == EXP_MEMORYCARD;
|
m_slot_combos[slot == 0 ? SLOT_B_INDEX : SLOT_A_INDEX]->currentIndex() == EXP_MEMORYCARD;
|
||||||
|
Reference in New Issue
Block a user