VERY experimental Nintendo Switch 2 emulator
C++
input_common: fix build when SDL2 is disabled
FearlessTobi358d645018fc
diff --git a/src/input_common/main.cpp b/src/input_common/main.cppindex c98c848cf0..95e351e241 100644--- a/src/input_common/main.cpp+++ b/src/input_common/main.cpp@@ -18,7 +18,9 @@ namespace InputCommon {static std::shared_ptr<Keyboard> keyboard;static std::shared_ptr<MotionEmu> motion_emu;+#ifdef HAVE_SDL2static std::unique_ptr<SDL::State> sdl;+#endifstatic std::unique_ptr<CemuhookUDP::State> udp;void Init() {@@ -29,7 +31,9 @@ void Init() {motion_emu = std::make_shared<MotionEmu>();Input::RegisterFactory<Input::MotionDevice>("motion_emu", motion_emu);+#ifdef HAVE_SDL2sdl = SDL::Init();+#endifudp = CemuhookUDP::Init();}@@ -40,7 +44,9 @@ void Shutdown() {Input::UnregisterFactory<Input::AnalogDevice>("analog_from_button");Input::UnregisterFactory<Input::MotionDevice>("motion_emu");motion_emu.reset();+#ifdef HAVE_SDL2sdl.reset();+#endifudp.reset();}