mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-14 04:32:14 +00:00
GH-1993 swap min/max memory settings when they are the wrong way around
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user