diff options
| author | 2020-05-02 21:47:17 +0200 | |
|---|---|---|
| committer | 2020-05-02 21:47:17 +0200 | |
| commit | 3d1e741645b4b615b626bfc66f751c229ef44bab (patch) | |
| tree | d421a4e8010f616b36d39783f26ee769d9d018a1 /src | |
| parent | Merge pull request #3811 from ogniK5377/audin-init (diff) | |
| download | yuzu-3d1e741645b4b615b626bfc66f751c229ef44bab.tar.gz yuzu-3d1e741645b4b615b626bfc66f751c229ef44bab.tar.xz yuzu-3d1e741645b4b615b626bfc66f751c229ef44bab.zip | |
input_common: fix build when SDL2 is disabled
Diffstat (limited to 'src')
| -rw-r--r-- | src/input_common/main.cpp | 6 |
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 | ||
| 19 | static std::shared_ptr<Keyboard> keyboard; | 19 | static std::shared_ptr<Keyboard> keyboard; |
| 20 | static std::shared_ptr<MotionEmu> motion_emu; | 20 | static std::shared_ptr<MotionEmu> motion_emu; |
| 21 | #ifdef HAVE_SDL2 | ||
| 21 | static std::unique_ptr<SDL::State> sdl; | 22 | static std::unique_ptr<SDL::State> sdl; |
| 23 | #endif | ||
| 22 | static std::unique_ptr<CemuhookUDP::State> udp; | 24 | static std::unique_ptr<CemuhookUDP::State> udp; |
| 23 | 25 | ||
| 24 | void Init() { | 26 | void 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 | ||