aboutsummaryrefslogtreecommitdiff
path: root/sokol_app.h
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2019-01-27 19:50:07 +0100
committerAndre Weissflog <floooh@gmail.com>2019-01-27 19:50:07 +0100
commitc999861520993f5a1cc2e683672e2c49ed799fb0 (patch)
tree785d6cf7baf2d0872a53544f1355984709da6de8 /sokol_app.h
parent79b28b819529b837c6c7396841a5e3aa634c8c23 (diff)
sokol_app.h Android: add a comment about weird ANativeWindow_setBuffersGeometry behaviour
Diffstat (limited to 'sokol_app.h')
-rw-r--r--sokol_app.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sokol_app.h b/sokol_app.h
index d0be6b8e..0d845bbb 100644
--- a/sokol_app.h
+++ b/sokol_app.h
@@ -4111,6 +4111,11 @@ _SOKOL_PRIVATE void _sapp_android_update_dimensions(ANativeWindow* window, bool
EGLint format;
EGLBoolean egl_result = eglGetConfigAttrib(state->display, state->config, EGL_NATIVE_VISUAL_ID, &format);
SOKOL_ASSERT(egl_result == EGL_TRUE);
+ /* NOTE: calling ANativeWindow_setBuffersGeometry() with the same dimensions
+ as the ANativeWindow size results in weird display artefacts, that's
+ why it's only called when the buffer geometry is different from
+ the window size
+ */
int32_t result = ANativeWindow_setBuffersGeometry(window, buf_w, buf_h, format);
SOKOL_ASSERT(result == 0);
}