summaryrefslogtreecommitdiff
path: root/src/input_common/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common/main.cpp')
-rw-r--r--src/input_common/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/input_common/main.cpp b/src/input_common/main.cpp
index c98c848cf..95e351e24 100644
--- a/src/input_common/main.cpp
+++ b/src/input_common/main.cpp
@@ -18,7 +18,9 @@ namespace InputCommon {
18 18
19static std::shared_ptr<Keyboard> keyboard; 19static std::shared_ptr<Keyboard> keyboard;
20static std::shared_ptr<MotionEmu> motion_emu; 20static std::shared_ptr<MotionEmu> motion_emu;
21#ifdef HAVE_SDL2
21static std::unique_ptr<SDL::State> sdl; 22static std::unique_ptr<SDL::State> sdl;
23#endif
22static std::unique_ptr<CemuhookUDP::State> udp; 24static std::unique_ptr<CemuhookUDP::State> udp;
23 25
24void Init() { 26void Init() {
@@ -29,7 +31,9 @@ void Init() {
29 motion_emu = std::make_shared<MotionEmu>(); 31 motion_emu = std::make_shared<MotionEmu>();
30 Input::RegisterFactory<Input::MotionDevice>("motion_emu", motion_emu); 32 Input::RegisterFactory<Input::MotionDevice>("motion_emu", motion_emu);
31 33
34#ifdef HAVE_SDL2
32 sdl = SDL::Init(); 35 sdl = SDL::Init();
36#endif
33 37
34 udp = CemuhookUDP::Init(); 38 udp = CemuhookUDP::Init();
35} 39}
@@ -40,7 +44,9 @@ void Shutdown() {
40 Input::UnregisterFactory<Input::AnalogDevice>("analog_from_button"); 44 Input::UnregisterFactory<Input::AnalogDevice>("analog_from_button");
41 Input::UnregisterFactory<Input::MotionDevice>("motion_emu"); 45 Input::UnregisterFactory<Input::MotionDevice>("motion_emu");
42 motion_emu.reset(); 46 motion_emu.reset();
47#ifdef HAVE_SDL2
43 sdl.reset(); 48 sdl.reset();
49#endif
44 udp.reset(); 50 udp.reset();
45} 51}
46 52