Jorge Rodriguez, the SDL_SCANCODE_* are good news, thanks, didn’t knew
about that as an option for Key/Button events, works great
, the lack
of internet documentation on forums, posts, etc. made it hard to find as of
date. Good stuff, thanks!
Design Discussion:
If i code an explicit code flow end when say the users presses Back Button,
main returning EXIT_SUCCESS, behaving in another way is not the C expected
behaviour, the app thread is tricky and not following the expectation on
flow behaviour. Not that i find the resource cached loading bad, but i
would consider to do it myself, say, with some app backgrounding call, how
many apps until you get out of memory?, performance?, batteries? speed?.
Say my app is gonna be heavy load, play once, 20 minutes, close it for
long, cached resources is not an issue or a need, thank I can close the app
with an exit().
SDL_SetLogicalSize( …, w, h), is kind of misleading in that okay, what
ever your design decision was you request aspect ratio matchs display mode
or stretching, occurs, but then why take redundant w, h, just say take an
scale factor, SDL_SetLogicalScale(…, s) since if i would want an
stretching, i would set it with the display mode and “window” creation.
Important things: misleading params, consider LogicalScale, stretching
mades sense for create window.
I’ve read Ryan Gordon say, “Don’t harcode your app to any sizes”, but that
hardcodes to some physical ratio a logical size. No big deal, i just set
logical height and width = height * ratio, but kind of makes more sense. To
admit, i think he’s right and i should have gone, probably gonna rewrite,
screen space on dstrects instead of image space ;-).
Anyway, not work stoppers, Thanks! ;-)On Sun, Apr 20, 2014 at 4:14 PM, Jorge Rodriguez <bs.vino at gmail.com> wrote:
Menu is SDL_SCANCODE_MENU and back is SDL_SCANCODE_AC_BACK. Not sure about
the others.
The app failing to exit is just how Android works. The intention is that
it allows the app to quickly come back up again if the user opens it again.
You can use it as an opportunity to save resources so they don’t have to be
loaded again, or you can call exit() to force close the process and make
sure it’s reloaded afresh next time, but this doesn’t always look as smooth.
2014-04-20 0:49 GMT+02:00 Juan Manuel Borges Ca?o <@Juan_Manuel_Borges_C>
:
Add to it the SDl2_image jpeg x86 .S arm asm issue.
This one wasn’t easy to find, Any way to catch physical buttons Menu and
Back? and while at it say, the full Android Physical Buttons, Power, Volume
Up, Down, Camera, … The SDLK table seems very PC centric.
Anyone reading? Cause i’m assuming 
On Thu, Apr 10, 2014 at 4:28 PM, Juan Manuel Borges Ca?o < @Juan_Manuel_Borges_C> wrote:
Oh, also to get it compiled there is some external deps issue, the jni
directory currenlty needs some links:
1 $ ls -lh jni
2
3 Android.mk
4 Application.mk
5 libmikmod-3.1.12 → SDL2_mixer-2.0.0/external/libmikmod-3.1.12/
6 libwebp-0.3.0 → SDL2_image-2.0.0/external/libwebp-0.3.0/
7 SDL2-2.0.3
8 SDL2_image-2.0.0
9 SDL2_mixer-2.0.0
10 SDL2_net-2.0.0
11 SDL2_ttf-2.0.12
12 smpeg2-2.0.0 → SDL2_mixer-2.0.0/external/smpeg2-2.0.0/
13 src
And that needs to be reflected in the SDLActivity.java:
47 // Load the .so
48 static {
49 System.loadLibrary(“SDL2”);
50 System.loadLibrary(“SDL2_image”);
51 System.loadLibrary(“mikmod”);
52 System.loadLibrary(“smpeg2”);
53 System.loadLibrary(“SDL2_mixer”);
54 System.loadLibrary(“SDL2_ttf”);
55 System.loadLibrary(“SDL2_net”);
56 System.loadLibrary(“main”);
57 }
58
Ideally none of the external deps should be exposed so explicitily, done
with freetype, libogg, etcetera, but for the run… 
Here is the mentioned SDL2_net-2.0.0/Android.mk i use, I link though i
still do not call anything of it:
1 LOCAL_PATH := $(call my-dir)
2
3 include $(CLEAR_VARS)
4
5 LOCAL_MODULE := SDL2_net
6
7 LOCAL_C_INCLUDES := $(LOCAL_PATH)
8
9 LOCAL_SRC_FILES := SDLnet.c SDLnetTCP.c SDLnetUDP.c SDLnetselect.c
10
11 LOCAL_SHARED_LIBRARIES := SDL2
12
13 LOCAL_EXPORT_C_INCLUDES += $(LOCAL_C_INCLUDES)
14
15 include $(BUILD_SHARED_LIBRARY)
That’s all,
On Thu, Apr 10, 2014 at 2:59 PM, Juan Manuel Borges Ca?o < @Juan_Manuel_Borges_C> wrote:
First first, great stuff for Android, for working out of the box.
SDL Friends Libraries could tie up better (full all in
android-full-project) for better set up experience (PNG & OGG Fan ;).
App fails to exit after main()'s return (needs a heavier exit()). Seems
Android’s java SDLActivity threading issue.
SDL2_net got no Android.mk, easily doable though, 4/5 source files, no
deps.
Giving Back To Open Source ++ 
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
Jorge “Vino” Rodr?guez
[ Tw http://twitter.com/vinobs | Fb http://www.facebook.com/bsvino |
G+ http://www.google.com/profiles/bs.vino | Hthttp://vinoisnotouzo.com]
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org