diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-12-11 02:08:05 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-12-11 02:08:05 +0000 |
commit | 667accab8e3cee23597e4a3af7b06c7efceb2a92 (patch) | |
tree | 3acd2a0b1bbfe8ed6f2a8898f86c6cce4a478ed5 | |
parent | a2d4e44b485222a8972ea9e555b148148c655bb9 (diff) |
Implement -no-quit option, by Xavier Gnata.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2239 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | sdl.c | 4 | ||||
-rw-r--r-- | vl.c | 17 | ||||
-rw-r--r-- | vl.h | 1 |
3 files changed, 19 insertions, 3 deletions
@@ -496,7 +496,9 @@ static void sdl_refresh(DisplayState *ds) sdl_process_key(&ev->key); break; case SDL_QUIT: - qemu_system_shutdown_request(); + if (!no_quit) { + qemu_system_shutdown_request(); + } break; case SDL_MOUSEMOTION: if (gui_grab || kbd_mouse_is_absolute()) { @@ -143,6 +143,7 @@ int graphic_height = 600; #endif int graphic_depth = 15; int full_screen = 0; +int no_quit = 0; CharDriverState *serial_hds[MAX_SERIAL_PORTS]; CharDriverState *parallel_hds[MAX_PARALLEL_PORTS]; #ifdef TARGET_I386 @@ -5845,7 +5846,10 @@ void help(void) "-hdc/-hdd file use 'file' as IDE hard disk 2/3 image\n" "-cdrom file use 'file' as IDE cdrom image (cdrom is ide1 master)\n" "-boot [a|c|d] boot on floppy (a), hard disk (c) or CD-ROM (d)\n" - "-snapshot write to temporary files instead of disk image files\n" + "-snapshot write to temporary files instead of disk image files\n" +#ifdef CONFIG_SDL + "-no-quit disable SDL window close capability\n" +#endif #ifdef TARGET_I386 "-no-fd-bootchk disable boot signature checking for floppy disks\n" #endif @@ -5853,7 +5857,7 @@ void help(void) "-smp n set the number of CPUs to 'n' [default=1]\n" "-nographic disable graphical output and redirect serial I/Os to console\n" #ifndef _WIN32 - "-k language use keyboard layout (for example \"fr\" for French)\n" + "-k language use keyboard layout (for example \"fr\" for French)\n" #endif #ifdef HAS_AUDIO "-audio-help print list of audio drivers and their options\n" @@ -6007,6 +6011,7 @@ enum { QEMU_OPTION_parallel, QEMU_OPTION_loadvm, QEMU_OPTION_full_screen, + QEMU_OPTION_no_quit, QEMU_OPTION_pidfile, QEMU_OPTION_no_kqemu, QEMU_OPTION_kernel_kqemu, @@ -6083,6 +6088,9 @@ const QEMUOption qemu_options[] = { { "parallel", 1, QEMU_OPTION_parallel }, { "loadvm", HAS_ARG, QEMU_OPTION_loadvm }, { "full-screen", 0, QEMU_OPTION_full_screen }, +#ifdef CONFIG_SDL + { "no-quit", 0, QEMU_OPTION_no_quit }, +#endif { "pidfile", HAS_ARG, QEMU_OPTION_pidfile }, { "win2k-hack", 0, QEMU_OPTION_win2k_hack }, { "usbdevice", HAS_ARG, QEMU_OPTION_usbdevice }, @@ -6691,6 +6699,11 @@ int main(int argc, char **argv) case QEMU_OPTION_full_screen: full_screen = 1; break; +#ifdef CONFIG_SDL + case QEMU_OPTION_no_quit: + no_quit = 1; + break; +#endif case QEMU_OPTION_pidfile: create_pidfile(optarg); break; @@ -152,6 +152,7 @@ extern int kqemu_allowed; extern int win2k_install_hack; extern int usb_enabled; extern int smp_cpus; +extern int no_quit; /* XXX: make it dynamic */ #if defined (TARGET_PPC) || defined (TARGET_SPARC64) |