src/video/SDL_video.c
changeset 1545 8d9bb0cf2c2a
parent 1491 cf23b92602aa
child 1654 0a53c90a37f9
child 1736 3b2a92126f4d
equal deleted inserted replaced
1544:ab1e4c41ab71 1545:8d9bb0cf2c2a
   585 			return(NULL);
   585 			return(NULL);
   586 		}
   586 		}
   587 	}
   587 	}
   588 	this = video = current_video;
   588 	this = video = current_video;
   589 
   589 
       
   590 	/* Default to the current width and height */
       
   591 	if ( width == 0 ) {
       
   592 		width = video->info.current_w;
       
   593 	}
       
   594 	if ( height == 0 ) {
       
   595 		height = video->info.current_h;
       
   596 	}
   590 	/* Default to the current video bpp */
   597 	/* Default to the current video bpp */
   591 	if ( bpp == 0 ) {
   598 	if ( bpp == 0 ) {
   592 		flags |= SDL_ANYFORMAT;
   599 		flags |= SDL_ANYFORMAT;
   593 		bpp = SDL_VideoSurface->format->BitsPerPixel;
   600 		bpp = SDL_VideoSurface->format->BitsPerPixel;
   594 	}
   601 	}
   887 		SDL_PublicSurface = SDL_ShadowSurface;
   894 		SDL_PublicSurface = SDL_ShadowSurface;
   888 	} else {
   895 	} else {
   889 		SDL_PublicSurface = SDL_VideoSurface;
   896 		SDL_PublicSurface = SDL_VideoSurface;
   890 	}
   897 	}
   891 	video->info.vfmt = SDL_VideoSurface->format;
   898 	video->info.vfmt = SDL_VideoSurface->format;
       
   899 	video->info.current_w = SDL_VideoSurface->w;
       
   900 	video->info.current_h = SDL_VideoSurface->h;
   892 
   901 
   893 	/* We're done! */
   902 	/* We're done! */
   894 	return(SDL_PublicSurface);
   903 	return(SDL_PublicSurface);
   895 }
   904 }
   896 
   905