A tiny SDL Android feature request

Hi all. It’s very useful to use SDL2 for android game development. But
sometimes you need to add some more custom java code (Facebook
integration for example). It’s obviously a bad idea to modify
SDLActivity.java directly because you will get nasty conflicts once
it’s updated in SDL repo. So better is to subclass from SDLActivity
and place all your code in subclass. The problem is that I need access
to “private static ViewGroup mLayout;” in my subclass. So my proposal
is to change all “private static” to “protected static”. Can someone
with write access do it for me? Too lazy to make patch for such simple
find-and-replace thing. Thanks in advance.

Regards, Alexey

see here: http://bugzilla.libsdl.org/show_bug.cgi?id=1752Am 31.03.2013 19:08, schrieb Alexey Petruchik:

Hi all. It’s very useful to use SDL2 for android game development. But
sometimes you need to add some more custom java code (Facebook
integration for example). It’s obviously a bad idea to modify
SDLActivity.java directly because you will get nasty conflicts once
it’s updated in SDL repo. So better is to subclass from SDLActivity
and place all your code in subclass. The problem is that I need access
to “private static ViewGroup mLayout;” in my subclass. So my proposal
is to change all “private static” to “protected static”. Can someone
with write access do it for me? Too lazy to make patch for such simple
find-and-replace thing. Thanks in advance.

Regards, Alexey


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Sorry, to up old topic. But there is still no access to mLayout and bug
mentioned by Martin is resolved like WONTFIX. Can someone explain me the
reasons why private can not be changed to protected? I’m bored to change
private to protected after each SDLActivity.java update.

Regards, Alexey.On Sun, Mar 31, 2013 at 9:45 PM, Martin Gerhardy <martin.gerhardy at gmail.com>wrote:

Am 31.03.2013 19:08, schrieb Alexey Petruchik:

Hi all. It’s very useful to use SDL2 for android game development. But
sometimes you need to add some more custom java code (Facebook
integration for example). It’s obviously a bad idea to modify
SDLActivity.java directly because you will get nasty conflicts once
it’s updated in SDL repo. So better is to subclass from SDLActivity
and place all your code in subclass. The problem is that I need access
to “private static ViewGroup mLayout;” in my subclass. So my proposal
is to change all “private static” to “protected static”. Can someone
with write access do it for me? Too lazy to make patch for such simple
find-and-replace thing. Thanks in advance.

Regards, Alexey
_____________**
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

see here: http://bugzilla.libsdl.org/show_bug.cgi?id=1752http://bugzilla.libsdl.org/show_bug.cgi?id=1752
______________________________
_________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

SDL is designed to be portable between various devices. Adding support for system-specific functionality like this is generally bad practice.

For such a simple change, I see no reason to reject it, but I would also personally never document it because it shouldn’t be used within the context of SDL and similar APIs.------------------------
Nate Fries

I changed the private members to be protected.On Wed, May 15, 2013 at 6:44 AM, Alexey Petruchik wrote:

Sorry, to up old topic. But there is still no access to mLayout and bug
mentioned by Martin is resolved like WONTFIX. Can someone explain me the
reasons why private can not be changed to protected? I’m bored to change
private to protected after each SDLActivity.java update.

Regards, Alexey.

On Sun, Mar 31, 2013 at 9:45 PM, Martin Gerhardy < martin.gerhardy at gmail.com> wrote:

Am 31.03.2013 19:08, schrieb Alexey Petruchik:

Hi all. It’s very useful to use SDL2 for android game development. But
sometimes you need to add some more custom java code (Facebook
integration for example). It’s obviously a bad idea to modify
SDLActivity.java directly because you will get nasty conflicts once
it’s updated in SDL repo. So better is to subclass from SDLActivity
and place all your code in subclass. The problem is that I need access
to “private static ViewGroup mLayout;” in my subclass. So my proposal
is to change all “private static” to “protected static”. Can someone
with write access do it for me? Too lazy to make patch for such simple
find-and-replace thing. Thanks in advance.

Regards, Alexey
_____________**
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

see here: http://bugzilla.libsdl.org/show_bug.cgi?id=1752http://bugzilla.libsdl.org/show_bug.cgi?id=1752
______________________________
_________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org