src/video/fbcon/SDL_fbevents.c
changeset 1241 4b2146866b82
parent 1201 718d00094f82
child 1312 c9b51268668f
     1.1 --- a/src/video/fbcon/SDL_fbevents.c	Sun Jan 08 21:18:15 2006 +0000
     1.2 +++ b/src/video/fbcon/SDL_fbevents.c	Tue Jan 10 20:52:35 2006 +0000
     1.3 @@ -882,6 +882,7 @@
     1.4   */
     1.5  static void switch_vt(_THIS, unsigned short which)
     1.6  {
     1.7 +	struct fb_var_screeninfo vinfo;
     1.8  	struct vt_stat vtstate;
     1.9  	unsigned short v_active;
    1.10  	SDL_Surface *screen;
    1.11 @@ -906,6 +907,7 @@
    1.12  		memcpy(screen_contents, screen->pixels, screen_arealen);
    1.13  	}
    1.14  	FB_SavePaletteTo(this, 256, saved_pal);
    1.15 +	ioctl(console_fd, FBIOGET_VSCREENINFO, &vinfo);
    1.16  	ioctl(keyboard_fd, KDSETMODE, KD_TEXT);
    1.17  
    1.18  	/* New console, switch to it */
    1.19 @@ -923,6 +925,7 @@
    1.20  
    1.21  	/* Restore graphics mode and the contents of the screen */
    1.22  	ioctl(keyboard_fd, KDSETMODE, KD_GRAPHICS);
    1.23 +	ioctl(console_fd, FBIOPUT_VSCREENINFO, &vinfo);
    1.24  	FB_RestorePaletteFrom(this, 256, saved_pal);
    1.25  	if ( screen_contents ) {
    1.26  		memcpy(screen->pixels, screen_contents, screen_arealen);