diff --git a/src/qt/qt_main.cpp b/src/qt/qt_main.cpp index 40d8680eb..fcd317e54 100644 --- a/src/qt/qt_main.cpp +++ b/src/qt/qt_main.cpp @@ -92,6 +92,12 @@ int main(int argc, char* argv[]) { elapsed_timer.start(); SDL_Init(SDL_INIT_TIMER); + pc_init(argc, argv); + if (! pc_init_modules()) { + ui_msgbox_header(MBX_FATAL, VC(L"No ROMs found."), VC(L"86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory.")); + return 6; + } + main_window = new MainWindow(); main_window->show(); main_window->setFocus(); @@ -103,11 +109,6 @@ int main(int argc, char* argv[]) { } main_window->setFocusPolicy(Qt::StrongFocus); - pc_init(argc, argv); - if (! pc_init_modules()) { - ui_msgbox_header(MBX_FATAL, VC(L"No ROMs found."), VC(L"86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory.")); - return 6; - } pc_reset_hard_init(); /* Set the PAUSE mode depending on the renderer. */