qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 31/32] RFC: Simplify softmmu/main.c


From: Paolo Bonzini
Subject: Re: [PATCH 31/32] RFC: Simplify softmmu/main.c
Date: Thu, 24 Mar 2022 08:51:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0

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;".

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]