cocoa: switch over to new display registry
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180301100547.18962-4-kraxel@redhat.com
This commit is contained in:
parent
5ee1718f92
commit
5013b9e46a
@ -444,18 +444,6 @@ void qemu_display_register(QemuDisplay *ui);
|
||||
void qemu_display_early_init(DisplayOptions *opts);
|
||||
void qemu_display_init(DisplayState *ds, DisplayOptions *opts);
|
||||
|
||||
/* cocoa.m */
|
||||
#ifdef CONFIG_COCOA
|
||||
void cocoa_display_init(DisplayState *ds, DisplayOptions *opts);
|
||||
#else
|
||||
static inline void cocoa_display_init(DisplayState *ds, DisplayOptions *opts)
|
||||
{
|
||||
/* This must never be called if CONFIG_COCOA is disabled */
|
||||
error_report("Cocoa support is disabled");
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* vnc.c */
|
||||
void vnc_display_init(const char *id);
|
||||
void vnc_display_open(const char *id, Error **errp);
|
||||
|
14
ui/cocoa.m
14
ui/cocoa.m
@ -1683,7 +1683,7 @@ static void addRemovableDevicesMenuItems(void)
|
||||
qapi_free_BlockInfoList(pointerToFree);
|
||||
}
|
||||
|
||||
void cocoa_display_init(DisplayState *ds, DisplayOptions *opts)
|
||||
static void cocoa_display_init(DisplayState *ds, DisplayOptions *opts)
|
||||
{
|
||||
COCOA_DEBUG("qemu_cocoa: cocoa_display_init\n");
|
||||
|
||||
@ -1713,3 +1713,15 @@ void cocoa_display_init(DisplayState *ds, DisplayOptions *opts)
|
||||
*/
|
||||
addRemovableDevicesMenuItems();
|
||||
}
|
||||
|
||||
static QemuDisplay qemu_display_cocoa = {
|
||||
.type = DISPLAY_TYPE_COCOA,
|
||||
.init = cocoa_display_init,
|
||||
};
|
||||
|
||||
static void register_cocoa(void)
|
||||
{
|
||||
qemu_display_register(&qemu_display_cocoa);
|
||||
}
|
||||
|
||||
type_init(register_cocoa);
|
||||
|
Loading…
Reference in New Issue
Block a user