diff options
-rw-r--r-- | README.md | 28 | ||||
-rw-r--r-- | launcher/Application.cpp | 16 | ||||
-rw-r--r-- | launcher/Application.h | 2 |
3 files changed, 31 insertions, 15 deletions
@@ -9,7 +9,7 @@ Prism Launcher is a custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once. -This is a **fork** of the MultiMC Launcher and not endorsed by MultiMC. +This is a **fork** of the MultiMC Launcher and is not endorsed by MultiMC. ## Installation @@ -18,35 +18,35 @@ This is a **fork** of the MultiMC Launcher and not endorsed by MultiMC. <img src="https://repology.org/badge/vertical-allrepos/prismlauncher.svg" alt="Packaging status" align="right"> </a> -- All downloads and instructions for Prism Launcher can be found [on our website](https://prismlauncher.org/download/). -- Last build status can be found [here](https://github.com/PrismLauncher/PrismLauncher/actions). +- All downloads and instructions for Prism Launcher can be found on our [Website](https://prismlauncher.org/download/). +- Last build status can be found in the [GitHub Actions](https://github.com/PrismLauncher/PrismLauncher/actions). ### Development Builds There are development builds available [here](https://github.com/PrismLauncher/PrismLauncher/actions). These have debug information in the binaries, so their file sizes are relatively larger. -Portable builds are provided for Linux, Windows, and macOS. +Prebuilt Development builds are provided for **Linux**, **Windows** and **macOS**. -For Arch, Debian and Gentoo, respectively, you can use these packages to get compiled development versions: +For **Arch**, **Debian**, **Fedora**, **OpenSUSE (Tumbleweed)** and **Gentoo**, respectively, you can use these packages for the latest development versions: -[](https://aur.archlinux.org/packages/prismlauncher-qt5-git/) [](https://aur.archlinux.org/packages/prismlauncher-git/) [](https://mpr.makedeb.org/packages/prismlauncher-git) [](https://packages.gentoo.org/packages/games-action/prismlauncher) +[](https://aur.archlinux.org/packages/prismlauncher-qt5-git/) [](https://aur.archlinux.org/packages/prismlauncher-git/) [](https://mpr.makedeb.org/packages/prismlauncher-git) [](https://copr.fedorainfracloud.org/coprs/g3tchoo/prismlauncher/) [](https://build.opensuse.org/project/show/home:getchoo) [](https://packages.gentoo.org/packages/games-action/prismlauncher) -## Help & Support +## Community & Support -Feel free to create an issue if you need help. +Feel free to create a GitHub issue if you find a bug or want to suggest a new feature. We have multiple communities that can also help you. #### Join our Discord server: -[](https://discord.gg/prismlauncher) +[](https://discord.gg/prismlauncher) -#### Join our Matrix space: -[](https://matrix.to/#/#prismlauncher:matrix.org) +#### Join our Matrix space (Will be opened at a later date): +[](https://matrix.to/#/#prismlauncher:matrix.org) #### Join our SubReddit: -[](https://www.reddit.com/r/PrismLauncher/) +[](https://www.reddit.com/r/PrismLauncher/) ## Building -If you want to build Prism Launcher yourself, check [Build Instructions](https://prismlauncher.org/wiki/development/build-instructions/) for build instructions. +If you want to build Prism Launcher yourself, check the [Build Instructions](https://prismlauncher.org/wiki/development/build-instructions/). ## Translations @@ -97,6 +97,6 @@ Thanks to the awesome people over at [MacStadium](https://www.macstadium.com/), All launcher code is available under the GPL-3.0-only license. - + The logo and related assets are under the CC BY-SA 4.0 license. 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(); |