summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEduardo Habkost2016-04-19 21:55:21 +0200
committerEduardo Habkost2016-05-20 19:28:53 +0200
commite35ee7c1aa1f257d3e0e52422cf4bd79d3b68d58 (patch)
tree520474c2be6b0a4fdaee3187921f1e716ea1beaf
parentsdl: Initialization stubs (diff)
downloadqemu-e35ee7c1aa1f257d3e0e52422cf4bd79d3b68d58.tar.gz
qemu-e35ee7c1aa1f257d3e0e52422cf4bd79d3b68d58.tar.xz
qemu-e35ee7c1aa1f257d3e0e52422cf4bd79d3b68d58.zip
cocoa: cocoa_display_init() stub
One less #ifdef in vl.c. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
-rw-r--r--include/ui/console.h9
-rw-r--r--vl.c2
2 files changed, 9 insertions, 2 deletions
diff --git a/include/ui/console.h b/include/ui/console.h
index f3e749ddd5..7ac997f514 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -442,7 +442,16 @@ static inline void sdl_display_init(DisplayState *ds, int full_screen,
#endif
/* cocoa.m */
+#ifdef CONFIG_COCOA
void cocoa_display_init(DisplayState *ds, int full_screen);
+#else
+static inline void cocoa_display_init(DisplayState *ds, int full_screen)
+{
+ /* 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);
diff --git a/vl.c b/vl.c
index d5df442701..064870561a 100644
--- a/vl.c
+++ b/vl.c
@@ -4545,11 +4545,9 @@ int main(int argc, char **argv, char **envp)
case DT_SDL:
sdl_display_init(ds, full_screen, no_frame);
break;
-#if defined(CONFIG_COCOA)
case DT_COCOA:
cocoa_display_init(ds, full_screen);
break;
-#endif
#if defined(CONFIG_GTK)
case DT_GTK:
gtk_display_init(ds, full_screen, grab_on_hover);