aboutsummaryrefslogtreecommitdiff
path: root/ui/cocoa.m
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-03-01 11:05:37 +0100
committerGerd Hoffmann <kraxel@redhat.com>2018-03-05 08:44:11 +0100
commit5013b9e46a72c96999fab1523f722ab58152c59a (patch)
tree7c78acb6c1b0f4108ac73294449c02fcb2a49b0c /ui/cocoa.m
parent5ee1718f92bd82e0e581191b6326384d291199d3 (diff)
cocoa: switch over to new display registry
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180301100547.18962-4-kraxel@redhat.com
Diffstat (limited to 'ui/cocoa.m')
-rw-r--r--ui/cocoa.m14
1 files changed, 13 insertions, 1 deletions
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 90d9aa57ea..8b0dce90cb 100644
--- a/ui/cocoa.m
+++ b/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);