mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
ControllerInterface: Gate the input based on our new background input setting
This commit is contained in:
@ -5,6 +5,12 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
// For InputGateOn()
|
||||
// This is a really bad layering violation, but it's the cleanest
|
||||
// place I could find to put it.
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Host.h"
|
||||
|
||||
#include "InputCommon/ControllerInterface/Device.h"
|
||||
|
||||
namespace ciface
|
||||
@ -74,6 +80,16 @@ void Device::ClearInputState()
|
||||
// kinda slow but, w/e, should only happen when user unplugs a device while playing
|
||||
}
|
||||
|
||||
bool Device::Control::InputGateOn()
|
||||
{
|
||||
if (SConfig::GetInstance().m_BackgroundInput)
|
||||
return true;
|
||||
else if (Host_RendererHasFocus())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// DeviceQualifier :: ToString
|
||||
//
|
||||
|
Reference in New Issue
Block a user