summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2003-03-28 06:13:59 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2003-03-28 06:13:59 (GMT)
commit30117f3441906093e12a5f5d5c3a261b0bad2276 (patch)
tree581ae31ea408e4dc5a3f85bb1ff9686cb83f3f17
parent97117a4ed0666afd9bac1b332412a9137487651a (diff)
downloadgrv-30117f3441906093e12a5f5d5c3a261b0bad2276.zip
grv-30117f3441906093e12a5f5d5c3a261b0bad2276.tar.gz
grv-30117f3441906093e12a5f5d5c3a261b0bad2276.tar.bz2
grv-30117f3441906093e12a5f5d5c3a261b0bad2276.tar.xz
Disable the mouse cursor when running fullscreen
-rw-r--r--graphics.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/graphics.c b/graphics.c
index d187e8c..aec7eec 100644
--- a/graphics.c
+++ b/graphics.c
@@ -389,13 +389,16 @@ int screen_init(int window)
| (opt.debug ? SDL_INIT_NOPARACHUTE : 0)) )
return -1;
+ atexit(SDL_Quit);
+
if ( !(rscreen = SDL_SetVideoMode(PX_WIDTH, PX_HEIGHT, 32,
SDL_SWSURFACE | (window ? 0 : SDL_FULLSCREEN))) ) {
- SDL_Quit();
return -1;
}
- atexit(SDL_Quit);
+ /* No mouse cursor, please */
+ if ( !window )
+ SDL_ShowCursor(SDL_DISABLE);
/* Convert colors to preferred machine representation */
for ( i = 0 ; i < NCOLORS ; i++ ) {