diff options
Diffstat (limited to 'application/MultiMC.cpp')
-rw-r--r-- | application/MultiMC.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp index fd004b05..feaf88a7 100644 --- a/application/MultiMC.cpp +++ b/application/MultiMC.cpp @@ -1125,8 +1125,19 @@ MainWindow* MultiMC::showMainWindow(bool minimized) * cd4 = CPU architecture */ QVariantMap customValues; - customValues["cm1"] = m_settings->get("MinMemAlloc"); - customValues["cm2"] = m_settings->get("MaxMemAlloc"); + int min = m_settings->get("MinMemAlloc").toInt(); + int max = m_settings->get("MaxMemAlloc").toInt(); + if(min < max) + { + customValues["cm1"] = min; + customValues["cm2"] = max; + } + else + { + customValues["cm1"] = max; + customValues["cm2"] = min; + } + constexpr uint64_t Mega = 1024ull * 1024ull; int ramSize = int(Sys::getSystemRam() / Mega); qDebug() << "RAM size is" << ramSize << "MB"; |