Add runtime input toggles and gated input sending
Some checks are pending
Build / setup (push) Waiting to run
Build / build-appimage (push) Blocked by required conditions
Build / build-steamlink (push) Blocked by required conditions
Build / build-windows-macos (push) Blocked by required conditions

This commit is contained in:
Joey Yakimowich-Payne 2026-02-11 17:18:53 -07:00
commit f78a63ab75
9 changed files with 312 additions and 68 deletions

View file

@ -2,6 +2,7 @@
#include <QSemaphore>
#include <QQuickWindow>
#include <atomic>
#include <Limelight.h>
#include <opus_multistream.h>
@ -125,6 +126,22 @@ public:
void setShouldExit(bool quitHostApp = false);
bool isGamepadInputAllowed() const
{
return m_AllowGamepadInput.load(std::memory_order_relaxed);
}
bool isKeyboardMouseInputAllowed() const
{
return m_AllowKeyboardMouseInput.load(std::memory_order_relaxed);
}
void setGamepadInputAllowed(bool allowed);
void setKeyboardMouseInputAllowed(bool allowed);
void toggleGamepadInputAllowed();
void toggleKeyboardMouseInputAllowed();
void notifyInputPermissionState();
signals:
void stageStarting(QString stage);
@ -255,6 +272,8 @@ private:
SDL_mutex* m_DecoderLock;
bool m_AudioDisabled;
bool m_AudioMuted;
std::atomic<bool> m_AllowGamepadInput;
std::atomic<bool> m_AllowKeyboardMouseInput;
Uint32 m_FullScreenFlag;
QQuickWindow* m_QtWindow;
bool m_UnexpectedTermination;