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