Revision 15546425
b/vl.c | ||
---|---|---|
2207 | 2207 |
fprintf(stderr, "Curses support is disabled\n"); |
2208 | 2208 |
exit(1); |
2209 | 2209 |
#endif |
2210 |
} else if (strstart(p, "gtk", &opts)) { |
|
2211 |
#ifdef CONFIG_GTK |
|
2212 |
display = DT_GTK; |
|
2213 |
#else |
|
2214 |
fprintf(stderr, "GTK support is disabled\n"); |
|
2215 |
exit(1); |
|
2216 |
#endif |
|
2210 | 2217 |
} else if (strstart(p, "none", &opts)) { |
2211 | 2218 |
display = DT_NONE; |
2212 | 2219 |
} else { |
... | ... | |
3999 | 4006 |
} |
4000 | 4007 |
} |
4001 | 4008 |
|
4009 |
if (using_spice) { |
|
4010 |
display_remote++; |
|
4011 |
} |
|
4012 |
if (display_type == DT_DEFAULT && !display_remote) { |
|
4013 |
#if defined(CONFIG_GTK) |
|
4014 |
display_type = DT_GTK; |
|
4015 |
#elif defined(CONFIG_SDL) || defined(CONFIG_COCOA) |
|
4016 |
display_type = DT_SDL; |
|
4017 |
#elif defined(CONFIG_VNC) |
|
4018 |
vnc_display = "localhost:0,to=99"; |
|
4019 |
show_vnc_port = 1; |
|
4020 |
#else |
|
4021 |
display_type = DT_NONE; |
|
4022 |
#endif |
|
4023 |
} |
|
4024 |
|
|
4025 |
#if defined(CONFIG_GTK) |
|
4026 |
if (display_type == DT_GTK) { |
|
4027 |
early_gtk_display_init(); |
|
4028 |
} |
|
4029 |
#endif |
|
4030 |
|
|
4002 | 4031 |
socket_init(); |
4003 | 4032 |
|
4004 | 4033 |
if (qemu_opts_foreach(qemu_find_opts("chardev"), chardev_init_func, NULL, 1) != 0) |
... | ... | |
4227 | 4256 |
/* just use the first displaystate for the moment */ |
4228 | 4257 |
ds = get_displaystate(); |
4229 | 4258 |
|
4230 |
if (using_spice) |
|
4231 |
display_remote++; |
|
4232 |
if (display_type == DT_DEFAULT && !display_remote) { |
|
4233 |
#if defined(CONFIG_SDL) || defined(CONFIG_COCOA) |
|
4234 |
display_type = DT_SDL; |
|
4235 |
#elif defined(CONFIG_VNC) |
|
4236 |
vnc_display = "localhost:0,to=99"; |
|
4237 |
show_vnc_port = 1; |
|
4238 |
#else |
|
4239 |
display_type = DT_NONE; |
|
4240 |
#endif |
|
4241 |
} |
|
4242 |
|
|
4243 |
|
|
4244 | 4259 |
/* init local displays */ |
4245 | 4260 |
switch (display_type) { |
4246 | 4261 |
case DT_NOGRAPHIC: |
... | ... | |
4259 | 4274 |
cocoa_display_init(ds, full_screen); |
4260 | 4275 |
break; |
4261 | 4276 |
#endif |
4277 |
#if defined(CONFIG_GTK) |
|
4278 |
case DT_GTK: |
|
4279 |
gtk_display_init(ds); |
|
4280 |
break; |
|
4281 |
#endif |
|
4262 | 4282 |
default: |
4263 | 4283 |
break; |
4264 | 4284 |
} |
Also available in: Unified diff