diff --git a/mainwindow.cpp b/mainwindow.cpp index 8c4b13a..9a577a5 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -282,8 +282,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), connect(temp_slot, &QAction::triggered, [=](bool checked) { if (checked) { - int slot = temp_slot->text().remove("Slot ").toInt(); - (*CoreDoCommand)(M64CMD_STATE_SET_SLOT, slot, NULL); + (*CoreDoCommand)(M64CMD_STATE_SET_SLOT, i, NULL); } }); } @@ -579,7 +578,7 @@ void MainWindow::updateOpenRecent() OpenRecent->addAction(recent[i]); QAction *temp_recent = recent[i]; connect(temp_recent, &QAction::triggered, [=]() - { openROM(temp_recent->text(), "", 0, 0, QJsonObject()); }); + { openROM(list.at(i), "", 0, 0, QJsonObject()); }); } OpenRecent->addSeparator(); diff --git a/netplay/createroom.cpp b/netplay/createroom.cpp index fa48eb2..80b6671 100644 --- a/netplay/createroom.cpp +++ b/netplay/createroom.cpp @@ -136,7 +136,7 @@ void CreateRoom::handleCreateButton() msgBox.exec(); return; } - if (loadROM(romButton->text()) == M64ERR_SUCCESS) + if (loadROM(filename) == M64ERR_SUCCESS) { createButton->setEnabled(false); (*CoreDoCommand)(M64CMD_ROM_GET_SETTINGS, sizeof(rom_settings), &rom_settings);