src/video/sdl_v.cpp
branchNewGRF_ports
changeset 10991 d8811e327d12
parent 10724 68a692eacf22
child 10994 cd9968b6f96b
equal deleted inserted replaced
10731:67db0d431d5e 10991:d8811e327d12
   116 	SDL_Rect **modes;
   116 	SDL_Rect **modes;
   117 
   117 
   118 	modes = SDL_CALL SDL_ListModes(NULL, SDL_SWSURFACE + (_fullscreen ? SDL_FULLSCREEN : 0));
   118 	modes = SDL_CALL SDL_ListModes(NULL, SDL_SWSURFACE + (_fullscreen ? SDL_FULLSCREEN : 0));
   119 
   119 
   120 	if (modes == NULL)
   120 	if (modes == NULL)
   121 		error("sdl: no modes available");
   121 		usererror("sdl: no modes available");
   122 
   122 
   123 	_all_modes = (modes == (void*)-1);
   123 	_all_modes = (modes == (void*)-1);
   124 
   124 
   125 	if (_all_modes) {
   125 	if (_all_modes) {
   126 		// all modes available, put some default ones here
   126 		// all modes available, put some default ones here
   196 
   196 
   197 	GetAvailableVideoMode(&w, &h);
   197 	GetAvailableVideoMode(&w, &h);
   198 
   198 
   199 	DEBUG(driver, 1, "SDL: using mode %dx%dx%d", w, h, bpp);
   199 	DEBUG(driver, 1, "SDL: using mode %dx%dx%d", w, h, bpp);
   200 
   200 
   201 	if (bpp == 0) error("Can't use a blitter that blits 0 bpp for normal visuals");
   201 	if (bpp == 0) usererror("Can't use a blitter that blits 0 bpp for normal visuals");
   202 
   202 
   203 	/* Give the application an icon */
   203 	/* Give the application an icon */
   204 	icon = SDL_CALL SDL_LoadBMP(ICON_DIR PATHSEP "openttd.32.bmp");
   204 	icon = SDL_CALL SDL_LoadBMP(ICON_DIR PATHSEP "openttd.32.bmp");
   205 	if (icon != NULL) {
   205 	if (icon != NULL) {
   206 		/* Get the colourkey, which will be magenta */
   206 		/* Get the colourkey, which will be magenta */