mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-16 06:31:51 -06:00
-no-frame option for sdl, by Christian Laursen.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2435 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
20d8a3edb0
commit
43523e9332
3 changed files with 16 additions and 3 deletions
8
sdl.c
8
sdl.c
|
@ -34,6 +34,7 @@ static int gui_grab; /* if true, all keyboard/mouse events are grabbed */
|
||||||
static int last_vm_running;
|
static int last_vm_running;
|
||||||
static int gui_saved_grab;
|
static int gui_saved_grab;
|
||||||
static int gui_fullscreen;
|
static int gui_fullscreen;
|
||||||
|
static int gui_noframe;
|
||||||
static int gui_key_modifier_pressed;
|
static int gui_key_modifier_pressed;
|
||||||
static int gui_keysym;
|
static int gui_keysym;
|
||||||
static int gui_fullscreen_initial_grab;
|
static int gui_fullscreen_initial_grab;
|
||||||
|
@ -59,6 +60,8 @@ static void sdl_resize(DisplayState *ds, int w, int h)
|
||||||
flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;
|
flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;
|
||||||
if (gui_fullscreen)
|
if (gui_fullscreen)
|
||||||
flags |= SDL_FULLSCREEN;
|
flags |= SDL_FULLSCREEN;
|
||||||
|
if (gui_noframe)
|
||||||
|
flags |= SDL_NOFRAME;
|
||||||
|
|
||||||
width = w;
|
width = w;
|
||||||
height = h;
|
height = h;
|
||||||
|
@ -469,7 +472,7 @@ static void sdl_cleanup(void)
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void sdl_display_init(DisplayState *ds, int full_screen)
|
void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
|
||||||
{
|
{
|
||||||
int flags;
|
int flags;
|
||||||
uint8_t data = 0;
|
uint8_t data = 0;
|
||||||
|
@ -485,6 +488,9 @@ void sdl_display_init(DisplayState *ds, int full_screen)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (no_frame)
|
||||||
|
gui_noframe = 1;
|
||||||
|
|
||||||
flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE;
|
flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE;
|
||||||
if (SDL_Init (flags)) {
|
if (SDL_Init (flags)) {
|
||||||
fprintf(stderr, "Could not initialize SDL - exiting\n");
|
fprintf(stderr, "Could not initialize SDL - exiting\n");
|
||||||
|
|
9
vl.c
9
vl.c
|
@ -163,6 +163,7 @@ int graphic_height = 600;
|
||||||
#endif
|
#endif
|
||||||
int graphic_depth = 15;
|
int graphic_depth = 15;
|
||||||
int full_screen = 0;
|
int full_screen = 0;
|
||||||
|
int no_frame = 0;
|
||||||
int no_quit = 0;
|
int no_quit = 0;
|
||||||
CharDriverState *serial_hds[MAX_SERIAL_PORTS];
|
CharDriverState *serial_hds[MAX_SERIAL_PORTS];
|
||||||
CharDriverState *parallel_hds[MAX_PARALLEL_PORTS];
|
CharDriverState *parallel_hds[MAX_PARALLEL_PORTS];
|
||||||
|
@ -6345,6 +6346,7 @@ void help(void)
|
||||||
"-boot [a|c|d|n] boot on floppy (a), hard disk (c), CD-ROM (d), or network (n)\n"
|
"-boot [a|c|d|n] boot on floppy (a), hard disk (c), CD-ROM (d), or network (n)\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
|
#ifdef CONFIG_SDL
|
||||||
|
"-no-frame open SDL window without a frame and window decorations\n"
|
||||||
"-no-quit disable SDL window close capability\n"
|
"-no-quit disable SDL window close capability\n"
|
||||||
#endif
|
#endif
|
||||||
#ifdef TARGET_I386
|
#ifdef TARGET_I386
|
||||||
|
@ -6514,6 +6516,7 @@ enum {
|
||||||
QEMU_OPTION_parallel,
|
QEMU_OPTION_parallel,
|
||||||
QEMU_OPTION_loadvm,
|
QEMU_OPTION_loadvm,
|
||||||
QEMU_OPTION_full_screen,
|
QEMU_OPTION_full_screen,
|
||||||
|
QEMU_OPTION_no_frame,
|
||||||
QEMU_OPTION_no_quit,
|
QEMU_OPTION_no_quit,
|
||||||
QEMU_OPTION_pidfile,
|
QEMU_OPTION_pidfile,
|
||||||
QEMU_OPTION_no_kqemu,
|
QEMU_OPTION_no_kqemu,
|
||||||
|
@ -6597,6 +6600,7 @@ const QEMUOption qemu_options[] = {
|
||||||
{ "loadvm", HAS_ARG, QEMU_OPTION_loadvm },
|
{ "loadvm", HAS_ARG, QEMU_OPTION_loadvm },
|
||||||
{ "full-screen", 0, QEMU_OPTION_full_screen },
|
{ "full-screen", 0, QEMU_OPTION_full_screen },
|
||||||
#ifdef CONFIG_SDL
|
#ifdef CONFIG_SDL
|
||||||
|
{ "no-frame", 0, QEMU_OPTION_no_frame },
|
||||||
{ "no-quit", 0, QEMU_OPTION_no_quit },
|
{ "no-quit", 0, QEMU_OPTION_no_quit },
|
||||||
#endif
|
#endif
|
||||||
{ "pidfile", HAS_ARG, QEMU_OPTION_pidfile },
|
{ "pidfile", HAS_ARG, QEMU_OPTION_pidfile },
|
||||||
|
@ -7224,6 +7228,9 @@ int main(int argc, char **argv)
|
||||||
full_screen = 1;
|
full_screen = 1;
|
||||||
break;
|
break;
|
||||||
#ifdef CONFIG_SDL
|
#ifdef CONFIG_SDL
|
||||||
|
case QEMU_OPTION_no_frame:
|
||||||
|
no_frame = 1;
|
||||||
|
break;
|
||||||
case QEMU_OPTION_no_quit:
|
case QEMU_OPTION_no_quit:
|
||||||
no_quit = 1;
|
no_quit = 1;
|
||||||
break;
|
break;
|
||||||
|
@ -7478,7 +7485,7 @@ int main(int argc, char **argv)
|
||||||
vnc_display_init(ds, vnc_display);
|
vnc_display_init(ds, vnc_display);
|
||||||
} else {
|
} else {
|
||||||
#if defined(CONFIG_SDL)
|
#if defined(CONFIG_SDL)
|
||||||
sdl_display_init(ds, full_screen);
|
sdl_display_init(ds, full_screen, no_frame);
|
||||||
#elif defined(CONFIG_COCOA)
|
#elif defined(CONFIG_COCOA)
|
||||||
cocoa_display_init(ds, full_screen);
|
cocoa_display_init(ds, full_screen);
|
||||||
#else
|
#else
|
||||||
|
|
2
vl.h
2
vl.h
|
@ -911,7 +911,7 @@ void isa_cirrus_vga_init(DisplayState *ds, uint8_t *vga_ram_base,
|
||||||
unsigned long vga_ram_offset, int vga_ram_size);
|
unsigned long vga_ram_offset, int vga_ram_size);
|
||||||
|
|
||||||
/* sdl.c */
|
/* sdl.c */
|
||||||
void sdl_display_init(DisplayState *ds, int full_screen);
|
void sdl_display_init(DisplayState *ds, int full_screen, int no_frame);
|
||||||
|
|
||||||
/* cocoa.m */
|
/* cocoa.m */
|
||||||
void cocoa_display_init(DisplayState *ds, int full_screen);
|
void cocoa_display_init(DisplayState *ds, int full_screen);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue