sdl: fix mouseclick operations in "--nogui" mode (ie: zapper)

This commit is contained in:
punkrockguy318 2011-10-08 19:49:35 +00:00
parent 66374f271a
commit 4059428c2b
1 changed files with 11 additions and 8 deletions

View File

@ -720,15 +720,18 @@ GetMouseData(uint32 (&d)[3])
t = SDL_GetMouseState(&x, &y); t = SDL_GetMouseState(&x, &y);
SDL_Event event; SDL_Event event;
#ifdef _GTK #ifdef _GTK
// don't ask for gtk mouse info when in fullscreen if(noGui == 0)
// we can use sdl directly in fullscreen
int fullscreen = 0;
g_config->getOption("SDL.Fullscreen", &fullscreen);
if(fullscreen == 0)
{ {
x=GtkMouseData[0]; // don't ask for gtk mouse info when in fullscreen
y=GtkMouseData[1]; // we can use sdl directly in fullscreen
t=GtkMouseData[2]; int fullscreen = 0;
g_config->getOption("SDL.Fullscreen", &fullscreen);
if(fullscreen == 0)
{
x=GtkMouseData[0];
y=GtkMouseData[1];
t=GtkMouseData[2];
}
} }
#endif #endif