mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-12-16 15:55:30 +00:00
Merge pull request #3872 from FearlessTobi/reopen-3792
input_common: fix build when SDL2 is disabled
This commit is contained in:
commit
3309a6cdf1
|
@ -18,7 +18,9 @@ namespace InputCommon {
|
||||||
|
|
||||||
static std::shared_ptr<Keyboard> keyboard;
|
static std::shared_ptr<Keyboard> keyboard;
|
||||||
static std::shared_ptr<MotionEmu> motion_emu;
|
static std::shared_ptr<MotionEmu> motion_emu;
|
||||||
|
#ifdef HAVE_SDL2
|
||||||
static std::unique_ptr<SDL::State> sdl;
|
static std::unique_ptr<SDL::State> sdl;
|
||||||
|
#endif
|
||||||
static std::unique_ptr<CemuhookUDP::State> udp;
|
static std::unique_ptr<CemuhookUDP::State> udp;
|
||||||
|
|
||||||
void Init() {
|
void Init() {
|
||||||
|
@ -29,7 +31,9 @@ void Init() {
|
||||||
motion_emu = std::make_shared<MotionEmu>();
|
motion_emu = std::make_shared<MotionEmu>();
|
||||||
Input::RegisterFactory<Input::MotionDevice>("motion_emu", motion_emu);
|
Input::RegisterFactory<Input::MotionDevice>("motion_emu", motion_emu);
|
||||||
|
|
||||||
|
#ifdef HAVE_SDL2
|
||||||
sdl = SDL::Init();
|
sdl = SDL::Init();
|
||||||
|
#endif
|
||||||
|
|
||||||
udp = CemuhookUDP::Init();
|
udp = CemuhookUDP::Init();
|
||||||
}
|
}
|
||||||
|
@ -40,7 +44,9 @@ void Shutdown() {
|
||||||
Input::UnregisterFactory<Input::AnalogDevice>("analog_from_button");
|
Input::UnregisterFactory<Input::AnalogDevice>("analog_from_button");
|
||||||
Input::UnregisterFactory<Input::MotionDevice>("motion_emu");
|
Input::UnregisterFactory<Input::MotionDevice>("motion_emu");
|
||||||
motion_emu.reset();
|
motion_emu.reset();
|
||||||
|
#ifdef HAVE_SDL2
|
||||||
sdl.reset();
|
sdl.reset();
|
||||||
|
#endif
|
||||||
udp.reset();
|
udp.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue