Skip to content

Commit

Permalink
dsfsdhgf
Browse files Browse the repository at this point in the history
  • Loading branch information
Arisotura committed Nov 18, 2024
1 parent d68091e commit 259eb4b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/frontend/qt_sdl/EmuInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ void EmuInstance::deleteWindow(int id, bool close)
if (close)
win->close();

if (deleting) return;

if (numWindows == 0)
{
// if we closed the last window, delete the instance
Expand Down Expand Up @@ -1456,16 +1458,16 @@ void EmuInstance::reset()


bool EmuInstance::bootToMenu()
{printf("bootToMenu 1\n");
{
// Keep whatever cart is in the console, if any.
if (!updateConsole())
// Try to update the console, but keep the existing cart. If that fails...
return false;
printf("bootToMenu 2\n");

// BIOS and firmware files are loaded, patched, and installed in UpdateConsole
if (nds->NeedsDirectBoot())
return false;
printf("bootToMenu 3\n");

initFirmwareSaveManager();
nds->Reset();
setBatteryLevels();
Expand Down
2 changes: 2 additions & 0 deletions src/frontend/qt_sdl/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,8 @@ void MainWindow::saveEnabled(bool enabled)

void MainWindow::closeEvent(QCloseEvent* event)
{
if (!emuInstance) return;

if (windowID == 0)
emuInstance->saveEnabledWindows();
else
Expand Down

0 comments on commit 259eb4b

Please sign in to comment.