Commit Graph

7 Commits

Author SHA1 Message Date
Julian Winkler
c16feb72e5 MessageQueue: fix integer overflow when converting ms to us 2025-01-01 11:33:16 +01:00
Julian Winkler
36a213b7e2 MessageQueue: optimize main loop implementation
The main loop implementation is quite performance critical. The GSource
is now reused, instead of creating new once each time. Also a timeout of
-1 will now be handled correctly in nativePollOnce().
2024-07-31 11:28:15 +00:00
Mis012
21627aecad ANativeWindow: make the while loop hack work on main thread 2024-04-17 19:27:16 +02:00
Mis012
f52a221c73 android_os_MessageQueue: move looper prototypes to header, fix incorrect prototype 2024-04-15 23:12:58 +02:00
Julian Winkler
23c0b006ef use handle_cache for Looper methods
These methods need to be called very often
2023-10-14 18:29:33 +02:00
Julian Winkler
4491de7f63 MessageQueue: integrate with glib main loop
Adds a special treatment for the main Looper to not block in java code,
but instead return to glib managed thread loop. Timeouts in the mainloop
are now handled using g_timeout_add_full().

Also defer Activity construction, so that every thing is set up properly
when the constructor runs.
2023-08-08 14:18:20 +02:00
Mis012
08998b0076 make Looper, Handler, and MessageQueue work properly
this for example makes Unity apps not steal the main thread,
hanging Gtk.
2023-07-25 14:27:21 +02:00