Fix controller polling when there's no Host. Fixes #17187

This commit is contained in:
Henrik Rydgård 2023-03-26 00:33:07 +01:00
parent afb17119b7
commit 9a6a23110b

View file

@ -23,7 +23,6 @@
#include "Common/System/System.h"
#include "Common/Thread/ThreadUtil.h"
#include "Core/Config.h"
#include "Core/Host.h"
#include "Windows/InputDevice.h"
static std::atomic_flag threadRunningFlag;
@ -31,7 +30,7 @@ static std::thread inputThread;
static std::atomic_bool focused = ATOMIC_VAR_INIT(true);
inline static void ExecuteInputPoll() {
if (host && (focused.load(std::memory_order_relaxed) || !g_Config.bGamepadOnlyFocused)) {
if (focused.load(std::memory_order_relaxed) || !g_Config.bGamepadOnlyFocused) {
System_Notify(SystemNotification::POLL_CONTROLLERS);
}
}