[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 31/32] RFC: Simplify softmmu/main.c
From: |
Akihiko Odaki |
Subject: |
Re: [PATCH 31/32] RFC: Simplify softmmu/main.c |
Date: |
Wed, 20 Apr 2022 19:48:17 +0900 |
User-agent: |
Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 |
On 2022/04/20 16:57, Marc-André Lureau wrote:
Hi
On Thu, Mar 24, 2022 at 11:52 AM Paolo Bonzini <pbonzini@redhat.com
<mailto:pbonzini@redhat.com>> wrote:
On 3/23/22 16:57, marcandre.lureau@redhat.com
<mailto:marcandre.lureau@redhat.com> wrote:
> From: Marc-André Lureau<marcandre.lureau@redhat.com
<mailto: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.
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.daude@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