Index: SDL_fbevents.c =================================================================== RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/video/fbcon/SDL_fbevents.c,v retrieving revision 1.12 diff -u -r1.12 SDL_fbevents.c --- SDL_fbevents.c 6 Mar 2002 11:23:03 -0000 1.12 +++ SDL_fbevents.c 4 Mar 2003 16:37:20 -0000 @@ -595,10 +595,20 @@ mouse_termios.c_cflag |= CS8; mouse_termios.c_cflag |= B1200; tcsetattr(mouse_fd, TCSAFLUSH, &mouse_termios); + if( !strcmp( mousedrv, "PS2" ) ) + { + mouse_drv = MOUSE_PS2; #ifdef DEBUG_MOUSE -fprintf(stderr, "Using Microsoft mouse on %s\n", mousedev); + fprintf(stderr, "Using (user specified) PS2 mouse on %s\n", mousedev); #endif - mouse_drv = MOUSE_MS; + } + else + { +#ifdef DEBUG_MOUSE + fprintf(stderr, "Using (default) MS mouse on %s\n", mousedev); +#endif + mouse_drv = MOUSE_MS; + } } } if ( mouse_fd < 0 ) { @@ -836,10 +846,12 @@ { struct vt_stat vtstate; unsigned short current; - SDL_Surface *screen; __u16 saved_pal[3*256]; +#ifdef SAVE_SCREEN_CONTENTS + SDL_Surface *screen; Uint32 screen_arealen; Uint8 *screen_contents; +#endif /* Figure out whether or not we're switching to a new console */ if ( (ioctl(keyboard_fd, VT_GETSTATE, &vtstate) < 0) || @@ -851,12 +863,14 @@ /* Save the contents of the screen, and go to text mode */ SDL_mutexP(hw_lock); wait_idle(this); +#ifdef SAVE_SCREEN_CONTENTS screen = SDL_VideoSurface; screen_arealen = (screen->h*screen->pitch); screen_contents = (Uint8 *)malloc(screen_arealen); if ( screen_contents ) { - memcpy(screen_contents, screen->pixels, screen_arealen); + memcpy(screen_contents, screen->pixels + screen->offset, screen_arealen); } +#endif FB_SavePaletteTo(this, 256, saved_pal); ioctl(keyboard_fd, KDSETMODE, KD_TEXT); @@ -876,10 +890,14 @@ /* Restore graphics mode and the contents of the screen */ ioctl(keyboard_fd, KDSETMODE, KD_GRAPHICS); FB_RestorePaletteFrom(this, 256, saved_pal); +#ifdef SAVE_SCREEN_CONTENTS if ( screen_contents ) { - memcpy(screen->pixels, screen_contents, screen_arealen); + memcpy(screen->pixels + screen->offset, screen_contents, screen_arealen); free(screen_contents); } +#else + SDL_UpdateRect( SDL_VideoSurface, 0, 0, 0, 0 ); +#endif SDL_mutexV(hw_lock); }