changeset 86:fe6c1a45f2e9

Revert those last changes in favor of a temporary Android-only fix.
author Brian Smith <brian@dbsoft.org>
date Thu, 16 Dec 2021 10:48:25 -0600
parents c9449a0e11c5
children c13109417997
files cc.c
diffstat 1 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/cc.c	Thu Dec 16 09:57:36 2021 -0600
+++ b/cc.c	Thu Dec 16 10:48:25 2021 -0600
@@ -468,15 +468,7 @@
 			if(gList[z].Update)
 				gList[z].Update(&gList[z], 0);
 			if(gList[z].Draw && gList[z].hwndDraw && !(gList[z].Flags & fHidden))
-			{
-				/* Unlock the mutex to call render redaw.
-				 * We don't want to be holding the mutext if it calls
-				 * the expose callback immediately.
-				 */
-				dw_mutex_unlock(hMtx);
 				dw_render_redraw(gList[z].hwndDraw[0]);
-				dw_mutex_lock(hMtx);
-			}
 			z++;
 		}
 		dw_mutex_unlock(hMtx);
@@ -722,14 +714,20 @@
 
 	if(inst)
 	{
+#ifdef __ANDROID__
 		if(dw_mutex_trylock(hMtx) == DW_ERROR_NONE)
 		{
+#else
+			dw_mutex_lock(hMtx);
+#endif
 			inst->Draw(inst);
 
 			dw_mutex_unlock(hMtx);
+#ifdef __ANDROID__
 		}
 		else
 			dw_render_redraw(hwnd);
+#endif
 	}
 	return TRUE;
 }