summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/platforms/android/androidjnimain.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/platforms/android/androidjnimain.cpp b/src/plugins/platforms/android/androidjnimain.cpp
index e7e0375adf..6031739efb 100644
--- a/src/plugins/platforms/android/androidjnimain.cpp
+++ b/src/plugins/platforms/android/androidjnimain.cpp
@@ -554,6 +554,12 @@ static void setDisplayMetrics(JNIEnv */*env*/, jclass /*clazz*/,
jint desktopWidthPixels, jint desktopHeightPixels,
jdouble xdpi, jdouble ydpi, jdouble scaledDensity)
{
+ // Android does not give us the correct screen size for immersive mode, but
+ // the surface does have the right size
+
+ widthPixels = qMax(widthPixels, desktopWidthPixels);
+ heightPixels = qMax(heightPixels, desktopHeightPixels);
+
m_desktopWidthPixels = desktopWidthPixels;
m_desktopHeightPixels = desktopHeightPixels;
m_scaledDensity = scaledDensity;