Browse Source
Merge pull request #3872 from FearlessTobi/reopen-3792
input_common: fix build when SDL2 is disabled
pull/15/merge
Mat M
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
0 deletions
-
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_SDL2
|
|
|
|
static std::unique_ptr<SDL::State> sdl; |
|
|
|
#endif
|
|
|
|
static 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_SDL2
|
|
|
|
sdl = SDL::Init(); |
|
|
|
#endif
|
|
|
|
|
|
|
|
udp = 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_SDL2
|
|
|
|
sdl.reset(); |
|
|
|
#endif
|
|
|
|
udp.reset(); |
|
|
|
} |
|
|
|
|
|
|
|
|