diff options
| author | 2020-06-21 21:15:58 -0400 | |
|---|---|---|
| committer | 2020-06-21 21:17:46 -0400 | |
| commit | 968d631aa59a0a4e51e219eaa143d2b95593c3e7 (patch) | |
| tree | 3429728a2848581b869a038a2da6499a2ca36952 /src/input_common/gcadapter/gc_poller.cpp | |
| parent | fix include thread (diff) | |
| download | yuzu-968d631aa59a0a4e51e219eaa143d2b95593c3e7.tar.gz yuzu-968d631aa59a0a4e51e219eaa143d2b95593c3e7.tar.xz yuzu-968d631aa59a0a4e51e219eaa143d2b95593c3e7.zip | |
std::arrays where appropriate, clear q in adapter class, other touch ups
Diffstat (limited to 'src/input_common/gcadapter/gc_poller.cpp')
| -rw-r--r-- | src/input_common/gcadapter/gc_poller.cpp | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/input_common/gcadapter/gc_poller.cpp b/src/input_common/gcadapter/gc_poller.cpp index 0e591baca..ac4126cb6 100644 --- a/src/input_common/gcadapter/gc_poller.cpp +++ b/src/input_common/gcadapter/gc_poller.cpp | |||
| @@ -56,9 +56,7 @@ GCButtonFactory::GCButtonFactory() { | |||
| 56 | adapter = GCAdapter::Adapter::GetInstance(); | 56 | adapter = GCAdapter::Adapter::GetInstance(); |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | GCButton::~GCButton() { | 59 | GCButton::~GCButton() = default; |
| 60 | // GCAdapter::Shutdown(); | ||
| 61 | } | ||
| 62 | 60 | ||
| 63 | std::unique_ptr<Input::ButtonDevice> GCButtonFactory::Create(const Common::ParamPackage& params) { | 61 | std::unique_ptr<Input::ButtonDevice> GCButtonFactory::Create(const Common::ParamPackage& params) { |
| 64 | int button_id = params.Get("button", 0); | 62 | int button_id = params.Get("button", 0); |
| @@ -163,17 +161,11 @@ Common::ParamPackage GCButtonFactory::GetNextInput() { | |||
| 163 | 161 | ||
| 164 | void GCButtonFactory::BeginConfiguration() { | 162 | void GCButtonFactory::BeginConfiguration() { |
| 165 | polling = true; | 163 | polling = true; |
| 166 | for (int i = 0; i < 4; i++) { | ||
| 167 | adapter->GetPadQueue()[i].Clear(); | ||
| 168 | } | ||
| 169 | adapter->BeginConfiguration(); | 164 | adapter->BeginConfiguration(); |
| 170 | } | 165 | } |
| 171 | 166 | ||
| 172 | void GCButtonFactory::EndConfiguration() { | 167 | void GCButtonFactory::EndConfiguration() { |
| 173 | polling = false; | 168 | polling = false; |
| 174 | for (int i = 0; i < 4; i++) { | ||
| 175 | adapter->GetPadQueue()[i].Clear(); | ||
| 176 | } | ||
| 177 | adapter->EndConfiguration(); | 169 | adapter->EndConfiguration(); |
| 178 | } | 170 | } |
| 179 | 171 | ||
| @@ -265,17 +257,11 @@ std::unique_ptr<Input::AnalogDevice> GCAnalogFactory::Create(const Common::Param | |||
| 265 | 257 | ||
| 266 | void GCAnalogFactory::BeginConfiguration() { | 258 | void GCAnalogFactory::BeginConfiguration() { |
| 267 | polling = true; | 259 | polling = true; |
| 268 | for (int i = 0; i < 4; i++) { | ||
| 269 | adapter->GetPadQueue()[i].Clear(); | ||
| 270 | } | ||
| 271 | adapter->BeginConfiguration(); | 260 | adapter->BeginConfiguration(); |
| 272 | } | 261 | } |
| 273 | 262 | ||
| 274 | void GCAnalogFactory::EndConfiguration() { | 263 | void GCAnalogFactory::EndConfiguration() { |
| 275 | polling = false; | 264 | polling = false; |
| 276 | for (int i = 0; i < 4; i++) { | ||
| 277 | adapter->GetPadQueue()[i].Clear(); | ||
| 278 | } | ||
| 279 | adapter->EndConfiguration(); | 265 | adapter->EndConfiguration(); |
| 280 | } | 266 | } |
| 281 | 267 | ||