mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
ControllerEmu: Make BackgroundInput a global setting through the virtualization
This will allow us to simplify the checks for background input and push them further down into the architecture, into the ControllerEmu layer. The new setting isn't actually used yet, though.
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "Common/IniFile.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "InputCommon/GCPadStatus.h"
|
||||
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
||||
|
||||
@ -114,6 +115,25 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class BackgroundInputSetting : public Setting
|
||||
{
|
||||
public:
|
||||
BackgroundInputSetting(const std::string &_name) : Setting(_name, false)
|
||||
{
|
||||
is_virtual = true;
|
||||
}
|
||||
|
||||
void SetValue(ControlState new_value) override
|
||||
{
|
||||
SConfig::GetInstance().m_BackgroundInput = new_value;
|
||||
}
|
||||
|
||||
ControlState GetValue() override
|
||||
{
|
||||
return SConfig::GetInstance().m_BackgroundInput;
|
||||
}
|
||||
};
|
||||
|
||||
ControlGroup(const std::string& _name, const unsigned int _type = GROUP_TYPE_OTHER) : name(_name), type(_type) {}
|
||||
virtual ~ControlGroup() {}
|
||||
|
||||
|
Reference in New Issue
Block a user