diff options
author | H. Peter Anvin <hpa@zytor.com> | 2003-03-28 06:13:59 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2003-03-28 06:13:59 +0000 |
commit | 30117f3441906093e12a5f5d5c3a261b0bad2276 (patch) | |
tree | 581ae31ea408e4dc5a3f85bb1ff9686cb83f3f17 /graphics.c | |
parent | 97117a4ed0666afd9bac1b332412a9137487651a (diff) | |
download | grv-30117f3441906093e12a5f5d5c3a261b0bad2276.tar.gz grv-30117f3441906093e12a5f5d5c3a261b0bad2276.tar.xz grv-30117f3441906093e12a5f5d5c3a261b0bad2276.zip |
Disable the mouse cursor when running fullscreen
Diffstat (limited to 'graphics.c')
-rw-r--r-- | graphics.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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++ ) { |