Noxalus
2016-10-14 15:08:49 UTC
Hello everyone. :)
I have an Android application using SDL in which I need to use a joystick, and this application has a WebView on top of the SDL rendering.
In this application, SDL joystick events are not triggered anymore from the moment when the WebView is added.
I figured out that the joystick inputs are intercepted by the WebView itself, and I've been able to retrieve joystick information using the Gamepad API (https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API). But this doesn't explain why SDL doesn't receive the joystick events anyway.
I did some research on the web and found the hint SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS (https://wiki.libsdl.org/SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS) that could be related to my problem, but it doesn't seem to have any impact, no joystick events are triggered. [Crying or Very sad]
Do you know what happen?
I have an Android application using SDL in which I need to use a joystick, and this application has a WebView on top of the SDL rendering.
In this application, SDL joystick events are not triggered anymore from the moment when the WebView is added.
I figured out that the joystick inputs are intercepted by the WebView itself, and I've been able to retrieve joystick information using the Gamepad API (https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API). But this doesn't explain why SDL doesn't receive the joystick events anyway.
I did some research on the web and found the hint SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS (https://wiki.libsdl.org/SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS) that could be related to my problem, but it doesn't seem to have any impact, no joystick events are triggered. [Crying or Very sad]
Do you know what happen?