rpcsx/rpcs3/Emu/Io/interception.cpp
Nekotekina eb66302907 atomic.hpp: replace std::atomic with atomic_t
Dual dependency is nothing good.
2020-12-07 17:13:12 +03:00

29 lines
552 B
C++

#include "stdafx.h"
#include "interception.h"
#include "KeyboardHandler.h"
#include "MouseHandler.h"
#include "Input/pad_thread.h"
#include "Emu/IdManager.h"
namespace input
{
atomic_t<bool> g_intercepted{false};
void SetIntercepted(bool intercepted)
{
g_intercepted = intercepted;
pad::SetIntercepted(intercepted);
if (const auto handler = g_fxo->get<KeyboardHandlerBase>())
{
handler->SetIntercepted(intercepted);
}
if (const auto handler = g_fxo->get<MouseHandlerBase>())
{
handler->SetIntercepted(intercepted);
}
}
}