summaryrefslogtreecommitdiffstats
path: root/src/input_common/main.cpp
diff options
context:
space:
mode:
authorwwylele <wwylele@gmail.com>2017-01-21 16:33:48 +0100
committerwwylele <wwylele@gmail.com>2017-03-01 22:30:57 +0100
commit51b1c1f211bf8112eba845256bd52cbd36a5932a (patch)
treead685410ae7b83df0474b9de206f99b68e5be398 /src/input_common/main.cpp
parentInputCommon: add AnalogFromButton (diff)
downloadyuzu-51b1c1f211bf8112eba845256bd52cbd36a5932a.tar
yuzu-51b1c1f211bf8112eba845256bd52cbd36a5932a.tar.gz
yuzu-51b1c1f211bf8112eba845256bd52cbd36a5932a.tar.bz2
yuzu-51b1c1f211bf8112eba845256bd52cbd36a5932a.tar.lz
yuzu-51b1c1f211bf8112eba845256bd52cbd36a5932a.tar.xz
yuzu-51b1c1f211bf8112eba845256bd52cbd36a5932a.tar.zst
yuzu-51b1c1f211bf8112eba845256bd52cbd36a5932a.zip
Diffstat (limited to 'src/input_common/main.cpp')
-rw-r--r--src/input_common/main.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/input_common/main.cpp b/src/input_common/main.cpp
index 8455fdc17..699f41e6b 100644
--- a/src/input_common/main.cpp
+++ b/src/input_common/main.cpp
@@ -7,6 +7,9 @@
#include "input_common/analog_from_button.h"
#include "input_common/keyboard.h"
#include "input_common/main.h"
+#ifdef HAVE_SDL2
+#include "input_common/sdl/sdl.h"
+#endif
namespace InputCommon {
@@ -17,12 +20,19 @@ void Init() {
Input::RegisterFactory<Input::ButtonDevice>("keyboard", keyboard);
Input::RegisterFactory<Input::AnalogDevice>("analog_from_button",
std::make_shared<InputCommon::AnalogFromButton>());
+#ifdef HAVE_SDL2
+ SDL::Init();
+#endif
}
void Shutdown() {
Input::UnregisterFactory<Input::ButtonDevice>("keyboard");
keyboard.reset();
Input::UnregisterFactory<Input::AnalogDevice>("analog_from_button");
+
+#ifdef HAVE_SDL2
+ SDL::Shutdown();
+#endif
}
Keyboard* GetKeyboard() {