aboutsummaryrefslogtreecommitdiff
path: root/sdl.c
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-29 23:19:20 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-29 23:19:20 +0000
commit8bf66d402b9ccf74ad2785177ac5d4801ce749c2 (patch)
tree9dc7152d3c3bd16506bd9af6baade92aafebadf7 /sdl.c
parent274fb0e1ed962e9ae43ab05e7939499cebb39d26 (diff)
Fix absolute mode mice.
width and height were never set which means that host coordinates were divided by -1 instead of (width - 1) / 0x7fff. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6476 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'sdl.c')
-rw-r--r--sdl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sdl.c b/sdl.c
index 17869926d2..aecdf638ea 100644
--- a/sdl.c
+++ b/sdl.c
@@ -93,7 +93,9 @@ static void sdl_resize(DisplayState *ds)
if (gui_noframe)
flags |= SDL_NOFRAME;
- real_screen = SDL_SetVideoMode(ds_get_width(ds), ds_get_height(ds), 0, flags);
+ width = ds_get_width(ds);
+ height = ds_get_height(ds);
+ real_screen = SDL_SetVideoMode(width, height, 0, flags);
if (!real_screen) {
fprintf(stderr, "Could not open SDL display\n");
exit(1);