mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Make --batch run Dolphin in headless mode, provided --exec is also passed
This commit is contained in:
parent
80e8037e0b
commit
b6df0bff93
@ -138,7 +138,7 @@ int main(int argc, char* argv[])
|
||||
UICommon::CreateDirectories();
|
||||
UICommon::Init();
|
||||
Resources::Init();
|
||||
Settings::Instance().SetBatchModeEnabled(options.is_set("batch"));
|
||||
Settings::Instance().SetBatchModeEnabled(options.is_set("batch") && options.is_set("exec"));
|
||||
|
||||
// Hook up alerts from core
|
||||
Common::RegisterMsgAlertHandler(QtMsgAlertHandler);
|
||||
@ -217,8 +217,11 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
#endif
|
||||
|
||||
auto* updater = new Updater(&win);
|
||||
updater->start();
|
||||
if (!Settings::Instance().IsBatchModeEnabled())
|
||||
{
|
||||
auto* updater = new Updater(&win);
|
||||
updater->start();
|
||||
}
|
||||
|
||||
retval = app.exec();
|
||||
}
|
||||
|
@ -1714,7 +1714,8 @@ void MainWindow::OnUpdateProgressDialog(QString title, int progress, int total)
|
||||
|
||||
void MainWindow::Show()
|
||||
{
|
||||
QWidget::show();
|
||||
if (!Settings::Instance().IsBatchModeEnabled())
|
||||
QWidget::show();
|
||||
|
||||
// If the booting of a game was requested on start up, do that now
|
||||
if (m_pending_boot != nullptr)
|
||||
|
@ -96,7 +96,9 @@ std::unique_ptr<optparse::OptionParser> CreateParser(ParserOptions options)
|
||||
.action("store_true")
|
||||
.help("Show the debugger pane and additional View menu options");
|
||||
parser->add_option("-l", "--logger").action("store_true").help("Open the logger");
|
||||
parser->add_option("-b", "--batch").action("store_true").help("Exit Dolphin with emulation");
|
||||
parser->add_option("-b", "--batch")
|
||||
.action("store_true")
|
||||
.help("Run Dolphin without the user interface (Requires --exec)");
|
||||
parser->add_option("-c", "--confirm").action("store_true").help("Set Confirm on Stop");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user