diff options
-rw-r--r-- | launcher/Application.cpp | 16 | ||||
-rw-r--r-- | launcher/Application.h | 2 | ||||
-rw-r--r-- | launcher/CMakeLists.txt | 10 | ||||
-rw-r--r-- | launcher/resources/backgrounds/backgrounds.qrc | 4 | ||||
-rw-r--r-- | launcher/resources/backgrounds/kitteh-spooky.png (renamed from launcher/resources/backgrounds/kitteh-ween.png) | bin | 94677 -> 94677 bytes | |||
-rw-r--r-- | launcher/resources/backgrounds/rory-flat-spooky.png | bin | 0 -> 66906 bytes | |||
-rw-r--r-- | launcher/resources/backgrounds/rory-spooky.png | bin | 0 -> 95940 bytes | |||
-rw-r--r-- | launcher/ui/MainWindow.cpp | 4 |
8 files changed, 27 insertions, 9 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp index 9f731efa..45cd9422 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -563,7 +563,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) // Memory m_settings->registerSetting({"MinMemAlloc", "MinMemoryAlloc"}, 512); - m_settings->registerSetting({"MaxMemAlloc", "MaxMemoryAlloc"}, 4096); + m_settings->registerSetting({"MaxMemAlloc", "MaxMemoryAlloc"}, suitableMaxMem()); m_settings->registerSetting("PermGen", 128); // Java Settings @@ -1591,3 +1591,17 @@ QString Application::getUserAgentUncached() return BuildConfig.USER_AGENT_UNCACHED; } + +int Application::suitableMaxMem() +{ + float totalRAM = (float)Sys::getSystemRam() / (float)Sys::mebibyte; + int maxMemoryAlloc; + + // If totalRAM < 6GB, use (totalRAM / 1.5), else 4GB + if (totalRAM < (4096 * 1.5)) + maxMemoryAlloc = (int) (totalRAM / 1.5); + else + maxMemoryAlloc = 4096; + + return maxMemoryAlloc; +} diff --git a/launcher/Application.h b/launcher/Application.h index 78ab8fbd..4c2f62d4 100644 --- a/launcher/Application.h +++ b/launcher/Application.h @@ -200,6 +200,8 @@ public: void ShowGlobalSettings(class QWidget * parent, QString open_page = QString()); + int suitableMaxMem(); + signals: void updateAllowedChanged(bool status); void globalSettingsAboutToOpen(); diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt index f92375fb..09a310ca 100644 --- a/launcher/CMakeLists.txt +++ b/launcher/CMakeLists.txt @@ -1066,7 +1066,7 @@ if(INSTALL_BUNDLE STREQUAL "full") # Image formats install( DIRECTORY "${QT_PLUGINS_DIR}/imageformats" - CONFIGURATIONS Debug RelWithDebInfo + CONFIGURATIONS Debug RelWithDebInfo "" DESTINATION ${PLUGIN_DEST_DIR} COMPONENT Runtime REGEX "tga|tiff|mng" EXCLUDE @@ -1084,7 +1084,7 @@ if(INSTALL_BUNDLE STREQUAL "full") # Icon engines install( DIRECTORY "${QT_PLUGINS_DIR}/iconengines" - CONFIGURATIONS Debug RelWithDebInfo + CONFIGURATIONS Debug RelWithDebInfo "" DESTINATION ${PLUGIN_DEST_DIR} COMPONENT Runtime REGEX "fontawesome" EXCLUDE @@ -1102,7 +1102,7 @@ if(INSTALL_BUNDLE STREQUAL "full") # Platform plugins install( DIRECTORY "${QT_PLUGINS_DIR}/platforms" - CONFIGURATIONS Debug RelWithDebInfo + CONFIGURATIONS Debug RelWithDebInfo "" DESTINATION ${PLUGIN_DEST_DIR} COMPONENT Runtime REGEX "minimal|linuxfb|offscreen" EXCLUDE @@ -1121,7 +1121,7 @@ if(INSTALL_BUNDLE STREQUAL "full") if(EXISTS "${QT_PLUGINS_DIR}/styles") install( DIRECTORY "${QT_PLUGINS_DIR}/styles" - CONFIGURATIONS Debug RelWithDebInfo + CONFIGURATIONS Debug RelWithDebInfo "" DESTINATION ${PLUGIN_DEST_DIR} COMPONENT Runtime ) @@ -1139,7 +1139,7 @@ if(INSTALL_BUNDLE STREQUAL "full") if(EXISTS "${QT_PLUGINS_DIR}/tls") install( DIRECTORY "${QT_PLUGINS_DIR}/tls" - CONFIGURATIONS Debug RelWithDebInfo + CONFIGURATIONS Debug RelWithDebInfo "" DESTINATION ${PLUGIN_DEST_DIR} COMPONENT Runtime ) diff --git a/launcher/resources/backgrounds/backgrounds.qrc b/launcher/resources/backgrounds/backgrounds.qrc index 652e7084..e55faf15 100644 --- a/launcher/resources/backgrounds/backgrounds.qrc +++ b/launcher/resources/backgrounds/backgrounds.qrc @@ -4,12 +4,14 @@ <file alias="kitteh">kitteh.png</file> <file alias="kitteh-xmas">kitteh-xmas.png</file> <file alias="kitteh-bday">kitteh-bday.png</file> - <file alias="kitteh-ween">kitteh-ween.png</file> + <file alias="kitteh-spooky">kitteh-spooky.png</file> <file alias="rory">rory.png</file> <file alias="rory-xmas">rory-xmas.png</file> <file alias="rory-bday">rory-bday.png</file> + <file alias="rory-spooky">rory-spooky.png</file> <file alias="rory-flat">rory-flat.png</file> <file alias="rory-flat-xmas">rory-flat-xmas.png</file> <file alias="rory-flat-bday">rory-flat-bday.png</file> + <file alias="rory-flat-spooky">rory-flat-spooky.png</file> </qresource> </RCC> diff --git a/launcher/resources/backgrounds/kitteh-ween.png b/launcher/resources/backgrounds/kitteh-spooky.png Binary files differindex deb0bebb..deb0bebb 100644 --- a/launcher/resources/backgrounds/kitteh-ween.png +++ b/launcher/resources/backgrounds/kitteh-spooky.png diff --git a/launcher/resources/backgrounds/rory-flat-spooky.png b/launcher/resources/backgrounds/rory-flat-spooky.png Binary files differnew file mode 100644 index 00000000..6360c612 --- /dev/null +++ b/launcher/resources/backgrounds/rory-flat-spooky.png diff --git a/launcher/resources/backgrounds/rory-spooky.png b/launcher/resources/backgrounds/rory-spooky.png Binary files differnew file mode 100644 index 00000000..a727619b --- /dev/null +++ b/launcher/resources/backgrounds/rory-spooky.png diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp index f697897a..b773e7de 100644 --- a/launcher/ui/MainWindow.cpp +++ b/launcher/ui/MainWindow.cpp @@ -1590,8 +1590,8 @@ void MainWindow::setCatBackground(bool enabled) QString cat = APPLICATION->settings()->get("BackgroundCat").toString(); if (non_stupid_abs(now.daysTo(xmas)) <= 4) { cat += "-xmas"; - } else if (cat == "kitteh" && non_stupid_abs(now.daysTo(halloween)) <= 4) { - cat += "-ween"; + } else if (non_stupid_abs(now.daysTo(halloween)) <= 4) { + cat += "-spooky"; } else if (non_stupid_abs(now.daysTo(birthday)) <= 12) { cat += "-bday"; } |