On 3/23/22 16:57, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau<marcandre.lureau@redhat.com>
>
> Move qemu_main() declaration to a new header.
>
> Simplify main.c since both cocoa & sdl cannot be enabled together.
>
> (there might be some small conflict with the RFC patch "cocoa: run qemu_init
> in the main thread", but the two look like they could be used together
> to improve the code)
That patch enables cocoa and SDL to be in the same binary, so I think
this one (while a good idea in theory) should be the one that loses.
Akihiko has ideas on how to use the standard main() for Cocoa, by
turning qemu_main_loop() into a function pointer, like
-void qemu_main_loop()
+static void (*qemu_main_loop)(void) = qemu_default_main_loop;
+void qemu_default_main_loop()
{
...
}
and cocoa_display_init() would do "qemu_main_loop = qemu_cocoa_main_loop;".
Akihiko, do you have a patch ? Since you have reviewed this patch already, are you willing to rebase on top of this one?