src/video/fbcon/SDL_fbvideo.c
changeset 6 332f458469f0
parent 0 74212992fb08
child 91 e85e03f195b4
equal deleted inserted replaced
5:ea6d917c9d51 6:332f458469f0
   269 			return(0);
   269 			return(0);
   270 		}
   270 		}
   271 	}
   271 	}
   272 
   272 
   273 	/* Only allow a mode if we have a valid timing for it */
   273 	/* Only allow a mode if we have a valid timing for it */
   274 	next_mode = 0;
   274 	next_mode = -1;
   275 	for ( i=0; i<(sizeof(vesa_timings)/sizeof(vesa_timings[0])); ++i ) {
   275 	for ( i=0; i<(sizeof(vesa_timings)/sizeof(vesa_timings[0])); ++i ) {
   276 		if ( (w == vesa_timings[i].xres) &&
   276 		if ( (w == vesa_timings[i].xres) &&
   277 		     (h == vesa_timings[i].yres) && vesa_timings[i].pixclock ) {
   277 		     (h == vesa_timings[i].yres) && vesa_timings[i].pixclock ) {
   278 			next_mode = i;
   278 			next_mode = i;
   279 			break;
   279 			break;
   280 		}
   280 		}
   281 	}
   281 	}
   282 	if ( ! next_mode ) {
   282 	if ( next_mode == -1 ) {
   283 #ifdef FBCON_DEBUG
   283 #ifdef FBCON_DEBUG
   284 		fprintf(stderr, "No valid timing line for mode %dx%d\n", w, h);
   284 		fprintf(stderr, "No valid timing line for mode %dx%d\n", w, h);
   285 #endif
   285 #endif
   286 		return(0);
   286 		return(0);
   287 	}
   287 	}