From 3d1e741645b4b615b626bfc66f751c229ef44bab Mon Sep 17 00:00:00 2001 From: FearlessTobi Date: Sat, 2 May 2020 21:47:17 +0200 Subject: input_common: fix build when SDL2 is disabled --- src/input_common/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/input_common') 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 { static std::shared_ptr keyboard; static std::shared_ptr motion_emu; +#ifdef HAVE_SDL2 static std::unique_ptr sdl; +#endif static std::unique_ptr udp; void Init() { @@ -29,7 +31,9 @@ void Init() { motion_emu = std::make_shared(); Input::RegisterFactory("motion_emu", motion_emu); +#ifdef HAVE_SDL2 sdl = SDL::Init(); +#endif udp = CemuhookUDP::Init(); } @@ -40,7 +44,9 @@ void Shutdown() { Input::UnregisterFactory("analog_from_button"); Input::UnregisterFactory("motion_emu"); motion_emu.reset(); +#ifdef HAVE_SDL2 sdl.reset(); +#endif udp.reset(); } -- cgit v1.2.3