2020-12-05 13:08:24 +01:00
|
|
|
#include "stdafx.h"
|
2020-10-04 22:46:28 +02:00
|
|
|
#include "interception.h"
|
|
|
|
|
#include "KeyboardHandler.h"
|
|
|
|
|
#include "MouseHandler.h"
|
|
|
|
|
#include "Input/pad_thread.h"
|
|
|
|
|
#include "Emu/IdManager.h"
|
|
|
|
|
|
|
|
|
|
namespace input
|
|
|
|
|
{
|
|
|
|
|
std::atomic<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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|