mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 17:57:58 -05:00
InputCommon: add SDL joystick support
This commit is contained in:
@ -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() {
|
||||
|
Reference in New Issue
Block a user