diff options
author | Michael Meeks <michael.meeks@suse.com> | 2012-01-30 13:52:50 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-01-30 13:52:50 +0000 |
commit | 4f989ddb0dc644c46dee97f4656a03fd24813d00 (patch) | |
tree | 834014193fbb67658db70b73d4b46d1f0303c352 /vcl/android | |
parent | a6e06bdbd3d22ce995c2bc8e4d2dd82a3854f1c4 (diff) |
android: ask for RGBA visual, and flip images the right way up.
Diffstat (limited to 'vcl/android')
-rw-r--r-- | vcl/android/androidinst.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx index a12d7ac646ba..31b1560005ac 100644 --- a/vcl/android/androidinst.cxx +++ b/vcl/android/androidinst.cxx @@ -102,7 +102,7 @@ static void BlitFrameRegionToWindow(ANativeWindow_Buffer *pOutBuffer, for (unsigned int y = 0; y < (unsigned int)(aSrcRect.bottom - aSrcRect.top); y++) { - unsigned char *sp = ( pSrc + nStride * (y + aSrcRect.top) + + unsigned char *sp = ( pSrc + nStride * (aSrcRect.bottom - aSrcRect.top - y - 1) + aSrcRect.left * 3 /* src pixel size */ ); switch (pOutBuffer->format) { @@ -238,10 +238,13 @@ void AndroidSalInstance::onAppCmd (struct android_app* app, int32_t cmd) ARect aRect = { 0, 0, 0, 0 }; aRect.right = ANativeWindow_getWidth(pWindow); aRect.bottom = ANativeWindow_getHeight(pWindow); - fprintf (stderr, "we have an app window ! %p %dx%x (%d)\n", + int nRet = ANativeWindow_setBuffersGeometry( + pWindow, ANativeWindow_getWidth(pWindow), + ANativeWindow_getHeight(pWindow), + WINDOW_FORMAT_RGBA_8888); + fprintf (stderr, "we have an app window ! %p %dx%x (%d) set %d\n", pWindow, aRect.right, aRect.bottom, - ANativeWindow_getFormat(pWindow)); - + ANativeWindow_getFormat(pWindow), nRet); break; } case APP_CMD_WINDOW_RESIZED: |