Qt: Skip emulator-specific things on startup if starting in manager mode:
- Don't try to read 86box.cfg; - Don't initialize subsystems that aren't used in manager mode; - Ignore `-I` or `-X` command-line options; - Don't block keyboard navigation and mnemonics in menus; - Don't perform UUID/WinBox/cpu_override checks.
This commit is contained in:
@@ -561,13 +561,11 @@ main(int argc, char *argv[])
|
||||
}
|
||||
#endif
|
||||
|
||||
qt_set_sequence_auto_mnemonic(false);
|
||||
Q_INIT_RESOURCE(qt_resources);
|
||||
Q_INIT_RESOURCE(qt_translations);
|
||||
QSurfaceFormat fmt = QSurfaceFormat::defaultFormat();
|
||||
fmt.setSwapInterval(0);
|
||||
QSurfaceFormat::setDefaultFormat(fmt);
|
||||
app.setStyle(new StyleOverride());
|
||||
|
||||
#ifdef __APPLE__
|
||||
CocoaEventFilter cocoafilter;
|
||||
@@ -586,6 +584,10 @@ main(int argc, char *argv[])
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!vmm_enabled)
|
||||
qt_set_sequence_auto_mnemonic(false);
|
||||
app.setStyle(new StyleOverride());
|
||||
|
||||
bool startMaximized = window_remember && monitor_settings[0].mon_window_maximized;
|
||||
fprintf(stderr, "Qt: version %s, platform \"%s\"\n", qVersion(), QApplication::platformName().toUtf8().data());
|
||||
ProgSettings::loadTranslators(&app);
|
||||
@@ -619,6 +621,19 @@ main(int argc, char *argv[])
|
||||
return 6;
|
||||
}
|
||||
|
||||
if (vmm_enabled) {
|
||||
// VMManagerMain vmm;
|
||||
// // Hackish until there is a proper solution
|
||||
// QApplication::setApplicationName("86Box VM Manager");
|
||||
// QApplication::setApplicationDisplayName("86Box VM Manager");
|
||||
// vmm.show();
|
||||
// vmm.exec();
|
||||
const auto vmm_main_window = new VMManagerMainWindow();
|
||||
vmm_main_window->show();
|
||||
QApplication::exec();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// UUID / copy / move detection
|
||||
if(!util::compareUuid()) {
|
||||
QMessageBox movewarnbox;
|
||||
@@ -681,19 +696,6 @@ main(int argc, char *argv[])
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (vmm_enabled) {
|
||||
// VMManagerMain vmm;
|
||||
// // Hackish until there is a proper solution
|
||||
// QApplication::setApplicationName("86Box VM Manager");
|
||||
// QApplication::setApplicationDisplayName("86Box VM Manager");
|
||||
// vmm.show();
|
||||
// vmm.exec();
|
||||
const auto vmm_main_window = new VMManagerMainWindow();
|
||||
vmm_main_window->show();
|
||||
QApplication::exec();
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef DISCORD
|
||||
discord_load();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user