mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 20:28:56 +00: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:
parent
0d49bf65a7
commit
5abc028ace
5 changed files with 43 additions and 2 deletions
|
@ -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() {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue