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 4036

Summary: Allow SDLActivity subclasses to specify the Runnable which invokes SDL_main
Product: SDL Reporter: Cole Campbell <cole.campbell>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2    
Version: don't know   
Hardware: All   
OS: Android (All)   
Attachments: This patch adds a new createSDLMainRunnable() method to SDLActivity.
Makes SDLInputConnection and DummyEdit public classes

Description Cole Campbell 2018-01-10 08:32:49 UTC
Created attachment 3129 [details]
This patch adds a new createSDLMainRunnable() method to SDLActivity.

Currently, SDL on Android expects to find SDL_main somewhere in native code. When using SDL in a Xamarin application, however, what we really want to do is write our entrypoint in managed code. The easiest way to do this is to allow subclasses of SDLActivity to provide their own Runnable to the SDL thread, as in the attached patch.
Comment 1 Cole Campbell 2018-01-20 20:27:35 UTC
Created attachment 3149 [details]
Makes SDLInputConnection and DummyEdit public classes

I've added an additional patch that expands on the same basic idea as the first one; it makes SDLInputConnection and DummyEdit into public classes so that they can be overridden from the Xamarin end if their functionality needs to be extended. (In my case, I need to change the type of software keyboard that's displayed.)