diff options
| author | degasus <wickmarkus@web.de> | 2013-01-24 16:58:28 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2013-01-24 16:58:28 +0100 |
| commit | e0ffdda26e5fb34b2f0d59d5d45b0deda9c90c19 (patch) | |
| tree | 8e289ea93c97fe7430ae501200b60327f572c7e2 /Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.h | |
| parent | d5748ebaef93cd601ae6ab5e12f39dd201593ad0 (diff) | |
| parent | d60cc373d1b389215eb63c4e20fe24e902680c7a (diff) | |
Merge branch 'immediate-removal' into GLSL-master
Conflicts:
Source/Core/VideoCommon/Src/PixelShaderGen.cpp
Source/Plugins/Plugin_VideoSoftware/Src/SWRenderer.cpp
immediate-removal is a new created branch seperated from master but reverted the revert of immediate-removal
so we get less conflicts by merging
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.h')
| -rw-r--r-- | Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.h b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.h index 7c5a236d75..b846bb56e8 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.h +++ b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.h @@ -87,7 +87,7 @@ public: Input* ToInput() { return this; } }; - + // // Output // @@ -122,6 +122,36 @@ public: protected: void AddInput(Input* const i); void AddOutput(Output* const o); + + class FullAnalogSurface : public Input + { + public: + FullAnalogSurface(Input* low, Input* high) + : m_low(*low), m_high(*high) + {} + + ControlState GetState() const + { + return (1 + m_high.GetState() - m_low.GetState()) / 2; + } + + std::string GetName() const + { + return m_low.GetName() + *m_high.GetName().rbegin(); + } + + private: + Input& m_low; + Input& m_high; + }; + + void AddAnalogInputs(Input* low, Input* high) + { + AddInput(low); + AddInput(high); + AddInput(new FullAnalogSurface(low, high)); + AddInput(new FullAnalogSurface(high, low)); + } private: std::vector<Input*> m_inputs; |
