mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-24 21:37:46 +00:00
Revert "Use KSandbox to wrap in flatpak host spawn if needed"
This reverts commit 68f76f63d4
.
This commit is contained in:
parent
81020b31a2
commit
83428c762e
1 changed files with 5 additions and 9 deletions
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#include "gamerunner.h"
|
#include "gamerunner.h"
|
||||||
|
|
||||||
#include <KSandbox>
|
|
||||||
|
|
||||||
#ifdef ENABLE_GAMEMODE
|
#ifdef ENABLE_GAMEMODE
|
||||||
#include <gamemode_client.h>
|
#include <gamemode_client.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -285,6 +283,10 @@ void GameRunner::launchExecutable(const Profile &profile, QProcess *process, con
|
||||||
env.insert(QStringLiteral("MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS"), QString::number(1));
|
env.insert(QStringLiteral("MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS"), QString::number(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(FLATPAK)
|
||||||
|
arguments.push_back(QStringLiteral("flatpak-spawn"));
|
||||||
|
arguments.push_back(QStringLiteral("--host"));
|
||||||
|
#endif
|
||||||
arguments.push_back(profile.winePath());
|
arguments.push_back(profile.winePath());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -299,13 +301,7 @@ void GameRunner::launchExecutable(const Profile &profile, QProcess *process, con
|
||||||
|
|
||||||
process->setProcessEnvironment(env);
|
process->setProcessEnvironment(env);
|
||||||
|
|
||||||
// Wrap in flatpak host spawn if needed
|
process->start(executable, arguments);
|
||||||
if (KSandbox::isInside()) {
|
|
||||||
const auto context = KSandbox::makeHostContext(*process);
|
|
||||||
process->start(context.program, context.arguments);
|
|
||||||
} else {
|
|
||||||
process->start(executable, arguments);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameRunner::addRegistryKey(const Profile &settings, QString key, QString value, QString data)
|
void GameRunner::addRegistryKey(const Profile &settings, QString key, QString value, QString data)
|
||||||
|
|
Loading…
Add table
Reference in a new issue