diff android/DWindows.kt @ 2539:822f814a54f4

Android: Fix memory corruption issue due to incorrectly allocating HPIXMAP. Also call DWRender.invalidate() from the main thread incase it wants to cause an immediate onDraw() ... but we don't need to wait for it.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 12 May 2021 06:17:22 +0000
parents 1b3b40c89cd0
children bb75e64e6138
line wrap: on
line diff
--- a/android/DWindows.kt	Tue May 11 22:53:29 2021 +0000
+++ b/android/DWindows.kt	Wed May 12 06:17:22 2021 +0000
@@ -1835,7 +1835,9 @@
 
     fun renderRedraw(render: DWRender)
     {
-        render.invalidate()
+        runOnUiThread {
+            render.invalidate()
+        }
     }
 
     fun pixmapBitBlt(dstr: DWRender?, dstp: Bitmap?, dstx: Int, dsty: Int, dstw: Int, dsth: Int,