diff options
| author | Matthew Parlane <parlane@gmail.com> | 2016-06-26 00:17:08 +1200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-06-26 00:17:08 +1200 |
| commit | a7448271a9203aea26f05f62b75e43c5e5860e98 (patch) | |
| tree | 5e43d6ee5fcfbe74a6bacf1eba81ee0a7a44fa14 /Source/Core/InputCommon/ControllerInterface/Android | |
| parent | 2f9a911c540473bb6cea5a9891a6a281aa2f3750 (diff) | |
| parent | 9b075556ea826699800d9478d1eed3a80368c348 (diff) | |
Merge pull request #3892 from leoetlino/ciface-synchronisation
ControllerInterface: Add synchronisation
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/Android')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/Android/Android.cpp | 13 | ||||
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/Android/Android.h | 4 |
2 files changed, 6 insertions, 11 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/Android/Android.cpp b/Source/Core/InputCommon/ControllerInterface/Android/Android.cpp index 3d68be633f..f6957e3ca1 100644 --- a/Source/Core/InputCommon/ControllerInterface/Android/Android.cpp +++ b/Source/Core/InputCommon/ControllerInterface/Android/Android.cpp @@ -4,21 +4,16 @@ #include "InputCommon/ControllerInterface/Android/Android.h" #include <sstream> +#include "InputCommon/ControllerInterface/ControllerInterface.h" namespace ciface { namespace Android { -void Init(std::vector<Core::Device*>& devices) +void Init() { - devices.push_back(new Touchscreen(0)); - devices.push_back(new Touchscreen(1)); - devices.push_back(new Touchscreen(2)); - devices.push_back(new Touchscreen(3)); - devices.push_back(new Touchscreen(4)); - devices.push_back(new Touchscreen(5)); - devices.push_back(new Touchscreen(6)); - devices.push_back(new Touchscreen(7)); + for (int i = 0; i < 8; ++i) + g_controller_interface.AddDevice(new Touchscreen(i)); } // Touchscreens and stuff diff --git a/Source/Core/InputCommon/ControllerInterface/Android/Android.h b/Source/Core/InputCommon/ControllerInterface/Android/Android.h index 53b578f699..29cc16d7ef 100644 --- a/Source/Core/InputCommon/ControllerInterface/Android/Android.h +++ b/Source/Core/InputCommon/ControllerInterface/Android/Android.h @@ -4,14 +4,14 @@ #pragma once -#include "InputCommon/ControllerInterface/Device.h" +#include "InputCommon/ControllerInterface/ControllerInterface.h" #include "jni/ButtonManager.h" namespace ciface { namespace Android { -void Init(std::vector<Core::Device*>& devices); +void Init(); class Touchscreen : public Core::Device { private: |
