From 4059428c2be6c185d13423113d3d9d10edd82783 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sat, 8 Oct 2011 19:49:35 +0000 Subject: [PATCH] sdl: fix mouseclick operations in "--nogui" mode (ie: zapper) --- src/drivers/sdl/input.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/drivers/sdl/input.cpp b/src/drivers/sdl/input.cpp index e8d6255d..885792bb 100644 --- a/src/drivers/sdl/input.cpp +++ b/src/drivers/sdl/input.cpp @@ -720,15 +720,18 @@ GetMouseData(uint32 (&d)[3]) t = SDL_GetMouseState(&x, &y); SDL_Event event; #ifdef _GTK - // don't ask for gtk mouse info when in fullscreen - // we can use sdl directly in fullscreen - int fullscreen = 0; - g_config->getOption("SDL.Fullscreen", &fullscreen); - if(fullscreen == 0) + if(noGui == 0) { - x=GtkMouseData[0]; - y=GtkMouseData[1]; - t=GtkMouseData[2]; + // don't ask for gtk mouse info when in fullscreen + // we can use sdl directly in fullscreen + int fullscreen = 0; + g_config->getOption("SDL.Fullscreen", &fullscreen); + if(fullscreen == 0) + { + x=GtkMouseData[0]; + y=GtkMouseData[1]; + t=GtkMouseData[2]; + } } #endif