On 2024/09/28 17:57, Phil Dennis-Jordan wrote:
Various system frameworks on macOS and other Apple platforms
require a main runloop to be processing events on the process’s
main thread. The Cocoa UI’s requirement to run the process as a
Cocoa application automatically enables this runloop, but it
can be useful to have the runloop handling events even without
the Cocoa UI active.

This change adds a non-app runloop mode to the cocoa_main
function. This can be requested by other code, while the Cocoa UI
additionally enables app mode. This arrangement ensures there is
only one qemu_main function switcheroo, and the Cocoa UI’s app
mode requirement and other subsystems’ runloop requests don’t
conflict with each other.

gtk and sdl need to run in the main thread so stealing the main thread by setting qemu_main will break them. Please investigate the possibility of running CFRunLoop in another thread.


The main runloop is required for the AppleGFX PV graphics device,
so the runloop request call has been added to its initialisation.

Please move this patch before any other patches that require it.

Regards,
Akihiko Odaki

Reply via email to