On 2022/04/20 16:57, Marc-André Lureau wrote:
Hi
On Thu, Mar 24, 2022 at 11:52 AM Paolo Bonzini <pbonz...@redhat.com
<mailto:pbonz...@redhat.com>> wrote:
On 3/23/22 16:57, marcandre.lur...@redhat.com
<mailto:marcandre.lur...@redhat.com> wrote:
> From: Marc-André Lureau<marcandre.lur...@redhat.com
<mailto:marcandre.lur...@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.
The patch does *not* allow to enable cocoa and SDL to be in the same
binary, but "[RFC PATCH-for-7.0 v4 0/2] cocoa: run qemu_init in the main
thread" does.
https://patchew.org/QEMU/20220317125534.38706-1-philippe.mathieu.da...@gmail.com/
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?
thanks
--
Marc-André Lureau
No, I don't have but I'm willing to author one if nobody else is going to.
Regards,
Akihiko Odaki