Skip to content
Permalink
Browse files

Give mouse position relative to window position, and do not generate …

…mouse button event if outside of the window
  • Loading branch information
pmandin committed Aug 10, 2004
1 parent 650d448 commit 154ff2443d4d7e67ca8872c8ff33f6c3ae9ecdd2

File 2 of 3 in 154ff24

@@ -400,6 +400,7 @@ int GEM_VideoInit(_THIS, SDL_PixelFormat *vformat)
GEM_handle = -1;
GEM_locked = SDL_FALSE;
GEM_win_fulled = SDL_FALSE;
GEM_fullscreen = SDL_FALSE;

VDI_screen = NULL;
VDI_pitch = VDI_w * VDI_pixelsize;
@@ -641,6 +642,8 @@ SDL_Surface *GEM_SetVideoMode(_THIS, SDL_Surface *current,
} else {
modeflags |= SDL_SWSURFACE;
}

GEM_fullscreen = SDL_TRUE;
} else {
int old_win_type;
short x2,y2,w2,h2;
@@ -701,6 +704,8 @@ SDL_Surface *GEM_SetVideoMode(_THIS, SDL_Surface *current,

/* Open the window */
wind_open(GEM_handle,x2,y2,w2,h2);

GEM_fullscreen = SDL_FALSE;
}

/* Set up the new mode framebuffer */

0 comments on commit 154ff24

Please sign in to comment.