Added NagUtils, nag people about trying to override JVM memory options
This commit is contained in:
@ -66,6 +66,7 @@
|
||||
#include "logic/OneSixAssets.h"
|
||||
#include "logic/OneSixUpdate.h"
|
||||
#include "logic/JavaUtils.h"
|
||||
#include "logic/NagUtils.h"
|
||||
|
||||
#include "logic/LegacyInstance.h"
|
||||
|
||||
@ -471,9 +472,12 @@ void MainWindow::instanceActivated(QModelIndex index)
|
||||
{
|
||||
if (!index.isValid())
|
||||
return;
|
||||
|
||||
BaseInstance *inst =
|
||||
(BaseInstance *)index.data(InstanceList::InstancePointerRole).value<void *>();
|
||||
|
||||
NagUtils::checkJVMArgs(MMC->settings()->get("JvmArgs").toString(), this);
|
||||
|
||||
bool autoLogin = MMC->settings()->get("AutoLogin").toBool();
|
||||
if (autoLogin)
|
||||
doAutoLogin();
|
||||
@ -485,6 +489,7 @@ void MainWindow::on_actionLaunchInstance_triggered()
|
||||
{
|
||||
if (m_selectedInstance)
|
||||
{
|
||||
NagUtils::checkJVMArgs(MMC->settings()->get("JvmArgs").toString(), this);
|
||||
doLogin();
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "settingsdialog.h"
|
||||
#include "ui_settingsdialog.h"
|
||||
#include "logic/JavaUtils.h"
|
||||
#include "logic/NagUtils.h"
|
||||
#include "gui/versionselectdialog.h"
|
||||
#include "gui/platform.h"
|
||||
#include "gui/CustomMessageBox.h"
|
||||
@ -159,6 +160,7 @@ void SettingsDialog::applySettings(SettingsObject *s)
|
||||
// Java Settings
|
||||
s->set("JavaPath", ui->javaPathTextBox->text());
|
||||
s->set("JvmArgs", ui->jvmArgsTextBox->text());
|
||||
NagUtils::checkJVMArgs(s->get("JvmArgs").toString(), this->parentWidget());
|
||||
|
||||
// Custom Commands
|
||||
s->set("PreLaunchCommand", ui->preLaunchCmdTextBox->text());
|
||||
|
Reference in New Issue
Block a user