src/video/fbcon/SDL_fbvideo.c
changeset 487 414d77a36716
parent 330 5fed858d551c
child 769 b8d311d90021
equal deleted inserted replaced
486:8b1c1ae7af11 487:414d77a36716
   461 
   461 
   462 	/* Query for the list of available video modes */
   462 	/* Query for the list of available video modes */
   463 	current_w = vinfo.xres;
   463 	current_w = vinfo.xres;
   464 	current_h = vinfo.yres;
   464 	current_h = vinfo.yres;
   465 	current_index = ((vinfo.bits_per_pixel+7)/8)-1;
   465 	current_index = ((vinfo.bits_per_pixel+7)/8)-1;
       
   466 #ifdef BROKEN_MODES
       
   467 	FB_AddMode(this, current_index, current_w, current_h);
       
   468 #else
   466 	for ( i=0; i<NUM_MODELISTS; ++i ) {
   469 	for ( i=0; i<NUM_MODELISTS; ++i ) {
   467 		SDL_nummodes[i] = 0;
   470 		SDL_nummodes[i] = 0;
   468 		SDL_modelist[i] = NULL;
   471 		SDL_modelist[i] = NULL;
   469 		for ( j=0; j<(sizeof(checkres)/sizeof(checkres[0])); ++j ) {
   472 		for ( j=0; j<(sizeof(checkres)/sizeof(checkres[0])); ++j ) {
   470 			unsigned int w, h;
   473 			unsigned int w, h;
   473 			w = checkres[j].w;
   476 			w = checkres[j].w;
   474 			h = checkres[j].h;
   477 			h = checkres[j].h;
   475 			if ( i == current_index ) {
   478 			if ( i == current_index ) {
   476 				if ( (current_w > w) || (current_h > h) ) {
   479 				if ( (current_w > w) || (current_h > h) ) {
   477 					/* Only check once */
   480 					/* Only check once */
   478 					FB_AddMode(this, i,current_w,current_h);
   481 					FB_AddMode(this, i, current_w, current_h);
   479 					current_index = -1;
   482 					current_index = -1;
   480 				}
   483 				}
   481 			}
   484 			}
   482 			if ( FB_CheckMode(this, &vinfo, i, &w, &h) ) {
   485 			if ( FB_CheckMode(this, &vinfo, i, &w, &h) ) {
   483 				FB_AddMode(this, i, w, h);
   486 				FB_AddMode(this, i, w, h);
   484 			}
   487 			}
   485 		}
   488 		}
   486 	}
   489 	}
       
   490 #endif /* BROKEN_MODES */
   487 
   491 
   488 	/* Fill in our hardware acceleration capabilities */
   492 	/* Fill in our hardware acceleration capabilities */
   489 	this->info.wm_available = 0;
   493 	this->info.wm_available = 0;
   490 	this->info.hw_available = 1;
   494 	this->info.hw_available = 1;
   491 	this->info.video_mem = finfo.smem_len/1024;
   495 	this->info.video_mem = finfo.smem_len/1024;