aboutsummaryrefslogtreecommitdiff
path: root/sdl.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-02-18 18:19:32 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-02-18 18:19:32 +0000
commit43523e9332e79a8ecbcec8444f975b8a705aa9d3 (patch)
tree06fda422ee7bc3b5a57dcc9b688dcf04e80795c3 /sdl.c
parent20d8a3edb062c96f9a08ccf0637f76ae2563c5e1 (diff)
downloadqemu-43523e9332e79a8ecbcec8444f975b8a705aa9d3.zip
qemu-43523e9332e79a8ecbcec8444f975b8a705aa9d3.tar.gz
qemu-43523e9332e79a8ecbcec8444f975b8a705aa9d3.tar.bz2
-no-frame option for sdl, by Christian Laursen.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2435 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'sdl.c')
-rw-r--r--sdl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sdl.c b/sdl.c
index 87ad390..0cb2241 100644
--- a/sdl.c
+++ b/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 gui_saved_grab;
static int gui_fullscreen;
+static int gui_noframe;
static int gui_key_modifier_pressed;
static int gui_keysym;
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;
if (gui_fullscreen)
flags |= SDL_FULLSCREEN;
+ if (gui_noframe)
+ flags |= SDL_NOFRAME;
width = w;
height = h;
@@ -469,7 +472,7 @@ static void sdl_cleanup(void)
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;
uint8_t data = 0;
@@ -485,6 +488,9 @@ void sdl_display_init(DisplayState *ds, int full_screen)
exit(1);
}
+ if (no_frame)
+ gui_noframe = 1;
+
flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE;
if (SDL_Init (flags)) {
fprintf(stderr, "Could not initialize SDL - exiting\n");