summaryrefslogtreecommitdiff
path: root/android-project/app
diff options
context:
space:
mode:
authorSylvain Becker <sylvain.becker@gmail.com>2019-01-09 23:19:26 +0100
committerSylvain Becker <sylvain.becker@gmail.com>2019-01-09 23:19:26 +0100
commitff551568c376bb0257920cea09d56952d3a71a12 (patch)
tree5291662e5bc929e507519219e4845b2580faadd8 /android-project/app
parent1e345acfd8f32dfec9e3785031fe4d8178251462 (diff)
Android: prevent a dummy error message sending SDL_DISPLAYEVENT_ORIENTATION
In the usual case, first call to onNativeOrientationChanged() is done before SDL has been initialised and would just set an error message "Video subsystem has not been initialized" without sending the event.
Diffstat (limited to 'android-project/app')
-rw-r--r--android-project/app/src/main/java/org/libsdl/app/SDLActivity.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
index 09cafc5579..fc6c5ad233 100644
--- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
+++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
@@ -260,6 +260,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
// Get our current screen orientation and pass it down.
mCurrentOrientation = SDLActivity.getCurrentOrientation();
+ // FIXME: with only one activity, SDL Thread is not yet started and this onNativeOrientationChanged() is ignored
SDLActivity.onNativeOrientationChanged(mCurrentOrientation);
setContentView(mLayout);