diff options
| author | 2020-06-21 21:50:58 -0400 | |
|---|---|---|
| committer | 2020-06-21 21:50:58 -0400 | |
| commit | 46b4461fbb0514dd50c096ef896b1752d81079d0 (patch) | |
| tree | 31245dd4ff76724295a20202cea9dba72635f3a0 /src/input_common/main.cpp | |
| parent | std::arrays where appropriate, clear q in adapter class, other touch ups (diff) | |
| download | yuzu-46b4461fbb0514dd50c096ef896b1752d81079d0.tar.gz yuzu-46b4461fbb0514dd50c096ef896b1752d81079d0.tar.xz yuzu-46b4461fbb0514dd50c096ef896b1752d81079d0.zip | |
shared_ptr for the GC adapter class, constexpr constants
Diffstat (limited to 'src/input_common/main.cpp')
| -rw-r--r-- | src/input_common/main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/input_common/main.cpp b/src/input_common/main.cpp index 89dddf7cf..fc399db7e 100644 --- a/src/input_common/main.cpp +++ b/src/input_common/main.cpp | |||
| @@ -25,13 +25,15 @@ static std::shared_ptr<MotionEmu> motion_emu; | |||
| 25 | static std::unique_ptr<SDL::State> sdl; | 25 | static std::unique_ptr<SDL::State> sdl; |
| 26 | #endif | 26 | #endif |
| 27 | static std::unique_ptr<CemuhookUDP::State> udp; | 27 | static std::unique_ptr<CemuhookUDP::State> udp; |
| 28 | static std::shared_ptr<GCAdapter::Adapter> gcadapter; | ||
| 28 | static std::shared_ptr<GCButtonFactory> gcbuttons; | 29 | static std::shared_ptr<GCButtonFactory> gcbuttons; |
| 29 | static std::shared_ptr<GCAnalogFactory> gcanalog; | 30 | static std::shared_ptr<GCAnalogFactory> gcanalog; |
| 30 | 31 | ||
| 31 | void Init() { | 32 | void Init() { |
| 32 | gcbuttons = std::make_shared<GCButtonFactory>(); | 33 | gcadapter = std::make_shared<GCAdapter::Adapter>(); |
| 34 | gcbuttons = std::make_shared<GCButtonFactory>(gcadapter); | ||
| 33 | Input::RegisterFactory<Input::ButtonDevice>("gcpad", gcbuttons); | 35 | Input::RegisterFactory<Input::ButtonDevice>("gcpad", gcbuttons); |
| 34 | gcanalog = std::make_shared<GCAnalogFactory>(); | 36 | gcanalog = std::make_shared<GCAnalogFactory>(gcadapter); |
| 35 | Input::RegisterFactory<Input::AnalogDevice>("gcpad", gcanalog); | 37 | Input::RegisterFactory<Input::AnalogDevice>("gcpad", gcanalog); |
| 36 | 38 | ||
| 37 | keyboard = std::make_shared<Keyboard>(); | 39 | keyboard = std::make_shared<Keyboard>(); |