summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Becker <sylvain.becker@gmail.com>2021-02-04 13:50:56 +0100
committerSylvain Becker <sylvain.becker@gmail.com>2021-02-04 13:50:56 +0100
commit640fa6145110c5a9917e199dcc862526a0acd305 (patch)
tree81859a2e34f9e54ffb1d446c14844da3668f3e66
parent2251a822f3fd4d30d538ad6bc6c694d379cc89e2 (diff)
downloadsdl-640fa6145110c5a9917e199dcc862526a0acd305.tar.gz
Android: documention update
-rw-r--r--docs/README-android.md33
1 files changed, 30 insertions, 3 deletions
diff --git a/docs/README-android.md b/docs/README-android.md
index fbd9f9906..4b7fefeed 100644
--- a/docs/README-android.md
+++ b/docs/README-android.md
@@ -205,10 +205,37 @@ app can continue to operate as it was.
However, there's a chance (on older hardware, or on systems under heavy load),
where the GL context can not be restored. In that case you have to listen for
-a specific message, (which is not yet implemented!) and restore your textures
-manually or quit the app (which is actually the kind of behaviour you'll see
-under iOS, if the OS can not restore your GL context it will just kill your app)
+a specific message (SDL_RENDER_DEVICE_RESET) and restore your textures
+manually or quit the app.
+You should not use the SDL renderer API while the app going in background:
+- SDL_APP_WILLENTERBACKGROUND:
+ after you read this message, GL context gets backed-up and you should not
+ use the SDL renderer API.
+
+- SDL_APP_DIDENTERFOREGROUND:
+ GL context is restored, and the SDL renderer API is available (unless you
+ receive SDL_RENDER_DEVICE_RESET).
+
+================================================================================
+ Mouse / Touch events
+================================================================================
+
+In some case, SDL generates synthetic mouse (resp. touch) events for touch
+(resp. mouse) devices.
+To enable/disable this behavior, see SDL_hints.h:
+- SDL_HINT_TOUCH_MOUSE_EVENTS
+- SDL_HINT_MOUSE_TOUCH_EVENTS
+
+================================================================================
+ Misc
+================================================================================
+
+For some device, it appears to works better setting explicitly GL attributes
+before creating a window:
+ SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
+ SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 6);
+ SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
================================================================================
Threads and the Java VM