We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3224

Summary: SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH doesn't work after init
Product: SDL Reporter: Anthony @ POW Games <ant>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED WORKSFORME QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2 CC: icculus
Version: 2.0.4   
Hardware: All   
OS: Android (All)   

Description Anthony @ POW Games 2016-01-07 17:48:45 UTC
SDL_androidtouch.c sets a callback in Android_InitTouch if SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH is set. The Wiki says that SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH can be used any time during runtime, but it only works if set before init. And will it cause problems if it's set after init, and Android_QuitTouch calls SDL_DelHintCallback when no callback was added?
Comment 1 Ryan C. Gordon 2016-01-08 11:56:18 UTC
(In reply to Anthony from comment #0)
> SDL_androidtouch.c sets a callback in Android_InitTouch if
> SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH is set.

No, it sets a callback that is called right away with the initial value of that hint, and then again any time the hint is changed.

Is this not working?

--ryan.
Comment 2 Anthony @ POW Games 2016-01-08 17:30:08 UTC
It appears to be working perfectly now (after I've slept and returned to the test code).

I'm trying to get more information about the right mouse button quit bug and was sure I had found a problem. Very sorry Ryan, forgive me.
Comment 3 Anthony @ POW Games 2016-01-08 19:36:10 UTC
I just found the source of my confusion. I was calling:

SDL_SetHint("SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH", "1");

I didn't think it would matter - my lack of understanding how SetHint works.
Comment 4 Ryan C. Gordon 2016-01-08 19:45:18 UTC
(In reply to Anthony from comment #3)
> I didn't think it would matter - my lack of understanding how SetHint works.

No worries!

--ryan.