From efb71fc38ef1bd64b1441240d2bea7233cd511b7 Mon Sep 17 00:00:00 2001 From: M4xw Date: Sat, 27 Oct 2018 19:27:24 +0200 Subject: [PATCH] [LIBNX] Initialize HID anyway, might fix randomly having no controls --- input/drivers/switch_input.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/input/drivers/switch_input.c b/input/drivers/switch_input.c index 0176ed63bc..2c48642b2e 100644 --- a/input/drivers/switch_input.c +++ b/input/drivers/switch_input.c @@ -137,6 +137,10 @@ static void switch_input_free_input(void *data) sw->joypad->destroy(); free(sw); + +#ifdef HAVE_LIBNX + hidExit(); +#endif } static void* switch_input_init(const char *joypad_driver) @@ -145,6 +149,10 @@ static void* switch_input_init(const char *joypad_driver) if (!sw) return NULL; +#ifdef HAVE_LIBNX + hidInitialize(); +#endif + sw->joypad = input_joypad_init_driver(joypad_driver, sw); #ifdef HAVE_LIBNX