The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
A tiny SDL Android feature request
Alexey Petruchik
Guest

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 wrote:
Quote:
Am [url=tel:31.03.2013%2019]31.03.2013 19[/url]:08, schrieb Alexey Petruchik:
Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
see here: http://bugzilla.libsdl.org/show_bug.cgi?id=1752
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Nathaniel J Fries


Joined: 30 Mar 2010
Posts: 444
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.
A tiny SDL Android feature request
Sam Lantinga


Joined: 10 Sep 2009
Posts: 1765
I changed the private members to be protected.


On Wed, May 15, 2013 at 6:44 AM, Alexey Petruchik wrote:
Quote:
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 wrote:
Quote:
Am [url=tel:31.03.2013%2019]31.03.2013 19[/url]:08, schrieb Alexey Petruchik:
Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
see here: http://bugzilla.libsdl.org/show_bug.cgi?id=1752
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org






_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org