We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2ed744 commit 8b7ee84Copy full SHA for 8b7ee84
1 file changed
src/lime/system/JNI.hx
@@ -466,9 +466,13 @@ class JNISafetyTools
466
467
// Check the thread before running the function.
468
f.expr = macro
469
- if (!lime.system.JNI.JNISafetyTools.onMainThread())
470
- haxe.MainLoop.runInMainThread($i{field.name}.bind($a{args}))
471
- else
+ if (!lime.system.JNI.JNISafetyTools.onMainThread()) {
+ #if haxe5
+ haxe.EventLoop.main.run($i{field.name}.bind($a{args}));
472
+ #else
473
+ haxe.MainLoop.runInMainThread($i{field.name}.bind($a{args}));
474
+ #end
475
+ } else
476
${f.expr};
477
default:
478
}
0 commit comments