fix: don't apply GameMode/MangoHud, if they aren't supported
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
33af0c6a7c
commit
d82bb29919
@ -447,7 +447,7 @@ QProcessEnvironment MinecraftInstance::createLaunchEnvironment()
|
|||||||
QProcessEnvironment env = createEnvironment();
|
QProcessEnvironment env = createEnvironment();
|
||||||
|
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
if (settings()->get("EnableMangoHud").toBool())
|
if (settings()->get("EnableMangoHud").toBool() && APPLICATION->capabilities() & Application::SupportsMangoHud)
|
||||||
{
|
{
|
||||||
auto preload = env.value("LD_PRELOAD", "") + ":libMangoHud_dlsym.so:libMangoHud.so";
|
auto preload = env.value("LD_PRELOAD", "") + ":libMangoHud_dlsym.so:libMangoHud.so";
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
#include <FileSystem.h>
|
#include <FileSystem.h>
|
||||||
#include <Commandline.h>
|
#include <Commandline.h>
|
||||||
|
|
||||||
|
#include "Application.h"
|
||||||
|
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
#include "gamemode_client.h"
|
#include "gamemode_client.h"
|
||||||
#endif
|
#endif
|
||||||
@ -86,7 +88,7 @@ void DirectJavaLaunch::executeTask()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
if (instance->settings()->get("EnableFeralGamemode").toBool())
|
if (instance->settings()->get("EnableFeralGamemode").toBool() && APPLICATION->capabilities() & Application::SupportsGameMode)
|
||||||
{
|
{
|
||||||
auto pid = m_process.processId();
|
auto pid = m_process.processId();
|
||||||
if (pid)
|
if (pid)
|
||||||
|
@ -181,7 +181,7 @@ void LauncherPartLaunch::executeTask()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
if (instance->settings()->get("EnableFeralGamemode").toBool())
|
if (instance->settings()->get("EnableFeralGamemode").toBool() && APPLICATION->capabilities() & Application::SupportsGameMode)
|
||||||
{
|
{
|
||||||
auto pid = m_process.processId();
|
auto pid = m_process.processId();
|
||||||
if (pid)
|
if (pid)
|
||||||
|
Loading…
Reference in New Issue
Block a user