fix: add support for automatic streamer mode check from flatpak (#6250)

Co-authored-by: nerix <nero.9@hotmail.de>
This commit is contained in:
Ilya Zlobintsev
2025-06-07 12:21:50 +03:00
committed by GitHub
parent 1d5da025bc
commit 652dfc9d64
2 changed files with 13 additions and 2 deletions
+12 -2
View File
@@ -3,6 +3,7 @@
#include "Application.hpp"
#include "common/Literals.hpp"
#include "common/QLogging.hpp"
#include "common/Version.hpp"
#include "providers/twitch/TwitchIrcServer.hpp"
#include "singletons/Settings.hpp"
#include "util/PostToThread.hpp"
@@ -55,8 +56,17 @@ bool isBroadcasterSoftwareActive()
static bool shouldShowWarning = true;
QProcess p;
p.start("pgrep", {"-xi", broadcastingBinaries().join("|")},
QIODevice::NotOpen);
if (Version::instance().isFlatpak())
{
p.start("flatpak-spawn",
{"--host", "pgrep", "-xi", broadcastingBinaries().join("|")},
QIODevice::NotOpen);
}
else
{
p.start("pgrep", {"-xi", broadcastingBinaries().join("|")},
QIODevice::NotOpen);
}
if (p.waitForFinished(1000) && p.exitStatus() == QProcess::NormalExit)
{