finally, it builds

(don't get your hopes up. it crashes)
This commit is contained in:
Arisotura
2024-05-20 00:04:05 +02:00
parent 3d47fa08b8
commit e50463e983

View File

@ -612,7 +612,7 @@ MainWindow::MainWindow(EmuInstance* inst, QWidget* parent) : QMainWindow(parent)
actEjectCart->setEnabled(false); actEjectCart->setEnabled(false);
actEjectGBACart->setEnabled(false); actEjectGBACart->setEnabled(false);
if (Config::ConsoleType == 1) if (emuInstance->globalCfg.GetInt("Emu.ConsoleType") == 1)
{ {
actInsertGBACart->setEnabled(false); actInsertGBACart->setEnabled(false);
for (int i = 0; i < 1; i++) for (int i = 0; i < 1; i++)
@ -636,7 +636,7 @@ MainWindow::MainWindow(EmuInstance* inst, QWidget* parent) : QMainWindow(parent)
actPowerManagement->setEnabled(false); actPowerManagement->setEnabled(false);
actSetupCheats->setEnabled(false); actSetupCheats->setEnabled(false);
actTitleManager->setEnabled(!Config::DSiNANDPath.empty()); actTitleManager->setEnabled(!emuInstance->globalCfg.GetString("DSi.NANDPath").empty());
actEnableCheats->setChecked(Config::EnableCheats); actEnableCheats->setChecked(Config::EnableCheats);
@ -1164,7 +1164,7 @@ void MainWindow::updateCartInserted(bool gba)
bool inserted; bool inserted;
if (gba) if (gba)
{ {
inserted = emuInstance->gbaCartInserted() && (Config::ConsoleType == 0); inserted = emuInstance->gbaCartInserted() && (emuInstance->globalCfg.GetInt("Emu.ConsoleType") == 0);
actCurrentGBACart->setText("GBA slot: " + emuInstance->gbaCartLabel()); actCurrentGBACart->setText("GBA slot: " + emuInstance->gbaCartLabel());
actEjectGBACart->setEnabled(inserted); actEjectGBACart->setEnabled(inserted);
} }
@ -1696,7 +1696,7 @@ void MainWindow::onEmuSettingsDialogFinished(int res)
{ {
emuThread->emuUnpause(); emuThread->emuUnpause();
if (Config::ConsoleType == 1) if (emuInstance->globalCfg.GetInt("Emu.ConsoleType") == 1)
{ {
actInsertGBACart->setEnabled(false); actInsertGBACart->setEnabled(false);
for (int i = 0; i < 1; i++) for (int i = 0; i < 1; i++)
@ -1717,7 +1717,7 @@ void MainWindow::onEmuSettingsDialogFinished(int res)
actCurrentGBACart->setText("GBA slot: " + emuInstance->gbaCartLabel()); actCurrentGBACart->setText("GBA slot: " + emuInstance->gbaCartLabel());
if (!RunningSomething) if (!RunningSomething)
actTitleManager->setEnabled(!Config::DSiNANDPath.empty()); actTitleManager->setEnabled(!emuInstance->globalCfg.GetString("DSi.NANDPath").empty());
} }
void MainWindow::onOpenInputConfig() void MainWindow::onOpenInputConfig()
@ -2067,7 +2067,7 @@ void MainWindow::onEmuStop()
actDateTime->setEnabled(true); actDateTime->setEnabled(true);
actPowerManagement->setEnabled(false); actPowerManagement->setEnabled(false);
actTitleManager->setEnabled(!Config::DSiNANDPath.empty()); actTitleManager->setEnabled(!emuInstance->globalCfg.GetString("DSi.NANDPath").empty());
} }
void MainWindow::onUpdateVideoSettings(bool glchange) void MainWindow::onUpdateVideoSettings(bool glchange)