diff options
author | fearlessTobi <thm.frey@gmail.com> | 2019-08-24 15:57:49 +0200 |
---|---|---|
committer | FearlessTobi <thm.frey@gmail.com> | 2020-01-23 20:55:26 +0100 |
commit | ac3690f2057fb93ce18f156ff5ffd720a6d6f60c (patch) | |
tree | d0ec80a2537b992146d34f5bf17ba0cc549bd88e /src/input_common/main.cpp | |
parent | Merge pull request #3341 from bunnei/time-posix-myrule (diff) | |
download | yuzu-ac3690f2057fb93ce18f156ff5ffd720a6d6f60c.tar yuzu-ac3690f2057fb93ce18f156ff5ffd720a6d6f60c.tar.gz yuzu-ac3690f2057fb93ce18f156ff5ffd720a6d6f60c.tar.bz2 yuzu-ac3690f2057fb93ce18f156ff5ffd720a6d6f60c.tar.lz yuzu-ac3690f2057fb93ce18f156ff5ffd720a6d6f60c.tar.xz yuzu-ac3690f2057fb93ce18f156ff5ffd720a6d6f60c.tar.zst yuzu-ac3690f2057fb93ce18f156ff5ffd720a6d6f60c.zip |
Diffstat (limited to 'src/input_common/main.cpp')
-rw-r--r-- | src/input_common/main.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/input_common/main.cpp b/src/input_common/main.cpp index 8e66c1b15..9e028da89 100644 --- a/src/input_common/main.cpp +++ b/src/input_common/main.cpp @@ -9,6 +9,7 @@ #include "input_common/keyboard.h" #include "input_common/main.h" #include "input_common/motion_emu.h" +#include "input_common/udp/udp.h" #ifdef HAVE_SDL2 #include "input_common/sdl/sdl.h" #endif @@ -18,6 +19,7 @@ namespace InputCommon { static std::shared_ptr<Keyboard> keyboard; static std::shared_ptr<MotionEmu> motion_emu; static std::unique_ptr<SDL::State> sdl; +static std::unique_ptr<CemuhookUDP::State> udp; void Init() { keyboard = std::make_shared<Keyboard>(); @@ -28,6 +30,8 @@ void Init() { Input::RegisterFactory<Input::MotionDevice>("motion_emu", motion_emu); sdl = SDL::Init(); + + udp = CemuhookUDP::Init(); } void Shutdown() { @@ -72,11 +76,13 @@ std::string GenerateAnalogParamFromKeys(int key_up, int key_down, int key_left, namespace Polling { std::vector<std::unique_ptr<DevicePoller>> GetPollers(DeviceType type) { + std::vector<std::unique_ptr<DevicePoller>> pollers; + #ifdef HAVE_SDL2 - return sdl->GetPollers(type); -#else - return {}; + pollers = sdl->GetPollers(type); #endif + + return pollers; } } // namespace Polling |