summaryrefslogtreecommitdiffstats
path: root/application/pages/global/JavaPage.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-07-11 22:43:35 +0200
committerPetr Mrázek <peterix@gmail.com>2017-07-11 22:43:35 +0200
commitafb0db24a801d935e9945c948ea8d4b831b59d38 (patch)
tree5db4cc2da656a2f8ffa51306ec808e3ec7632090 /application/pages/global/JavaPage.cpp
parent5ea170db7805528b1355cfe94987c349e851e5c3 (diff)
downloadMultiMC-afb0db24a801d935e9945c948ea8d4b831b59d38.tar
MultiMC-afb0db24a801d935e9945c948ea8d4b831b59d38.tar.gz
MultiMC-afb0db24a801d935e9945c948ea8d4b831b59d38.tar.lz
MultiMC-afb0db24a801d935e9945c948ea8d4b831b59d38.tar.xz
MultiMC-afb0db24a801d935e9945c948ea8d4b831b59d38.zip
NOISSUE set max of java heap spinboxes to detected physical memory
Diffstat (limited to 'application/pages/global/JavaPage.cpp')
-rw-r--r--application/pages/global/JavaPage.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/application/pages/global/JavaPage.cpp b/application/pages/global/JavaPage.cpp
index 543cc11f..f43fd641 100644
--- a/application/pages/global/JavaPage.cpp
+++ b/application/pages/global/JavaPage.cpp
@@ -30,6 +30,7 @@
#include "settings/SettingsObject.h"
#include <FileSystem.h>
#include "MultiMC.h"
+#include <sys.h>
JavaPage::JavaPage(QWidget *parent) : QWidget(parent), ui(new Ui::JavaPage)
{
@@ -40,6 +41,8 @@ JavaPage::JavaPage(QWidget *parent) : QWidget(parent), ui(new Ui::JavaPage)
resizer->addWidgetsFromLayout(ui->javaSettingsGroupBox->layout(), 0);
resizer->addWidgetsFromLayout(ui->customCommandsGroupBox->layout(), 0);
+ auto sysMB = Sys::getSystemRam() / Sys::megabyte;
+ ui->maxMemSpinBox->setMaximum(sysMB);
loadSettings();
}