Mercurial > sdl-ios-xcode
comparison src/video/fbcon/SDL_fbvideo.c @ 941:5095c4a264aa
Date: Mon, 12 Jul 2004 14:17:47 -0500
From: Richard Smith
Subject: Re: [SDL] Disableing color depth and mode searching
> Also, I should add that a quick way to get the desired effect is to
> #define BROKEN_MODES on top of the SDL_fbvideo.c file.
>
Ah yes, I see that looks like that will do what I need. Curious as to
why this is a #define and not an enviroment variable like the other
settings.
I would think that finding cards (or chips) with broken modes would be
the norm rather than the execption.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 21 Aug 2004 11:34:24 +0000 |
parents | b8d311d90021 |
children | 50f4e7e4d117 |
comparison
equal
deleted
inserted
replaced
940:bb1588ebe47b | 941:5095c4a264aa |
---|---|
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 | 466 if ( getenv("SDL_FB_BROKEN_MODES") != NULL ) { |
467 FB_AddMode(this, current_index, current_w, current_h); | 467 FB_AddMode(this, current_index, current_w, current_h); |
468 #else | 468 } else { |
469 for ( i=0; i<NUM_MODELISTS; ++i ) { | 469 for ( i=0; i<NUM_MODELISTS; ++i ) { |
470 SDL_nummodes[i] = 0; | 470 SDL_nummodes[i] = 0; |
471 SDL_modelist[i] = NULL; | 471 SDL_modelist[i] = NULL; |
472 for ( j=0; j<(sizeof(checkres)/sizeof(checkres[0])); ++j ) { | 472 for ( j=0; j<(sizeof(checkres)/sizeof(checkres[0])); ++j ) { |
473 unsigned int w, h; | 473 unsigned int w, h; |
474 | 474 |
475 /* See if we are querying for the current mode */ | 475 /* See if we are querying for the current mode */ |
476 w = checkres[j].w; | 476 w = checkres[j].w; |
477 h = checkres[j].h; | 477 h = checkres[j].h; |
478 if ( i == current_index ) { | 478 if ( i == current_index ) { |
479 if ( (current_w > w) || (current_h > h) ) { | 479 if ( (current_w > w) || (current_h > h) ) { |
480 /* Only check once */ | 480 /* Only check once */ |
481 FB_AddMode(this, i, current_w, current_h); | 481 FB_AddMode(this, i, current_w, current_h); |
482 current_index = -1; | 482 current_index = -1; |
483 } | |
484 } | |
485 if ( FB_CheckMode(this, &vinfo, i, &w, &h) ) { | |
486 FB_AddMode(this, i, w, h); | |
483 } | 487 } |
484 } | 488 } |
485 if ( FB_CheckMode(this, &vinfo, i, &w, &h) ) { | 489 } |
486 FB_AddMode(this, i, w, h); | 490 } |
487 } | |
488 } | |
489 } | |
490 #endif /* BROKEN_MODES */ | |
491 | 491 |
492 /* Fill in our hardware acceleration capabilities */ | 492 /* Fill in our hardware acceleration capabilities */ |
493 this->info.wm_available = 0; | 493 this->info.wm_available = 0; |
494 this->info.hw_available = 1; | 494 this->info.hw_available = 1; |
495 this->info.video_mem = finfo.smem_len/1024; | 495 this->info.video_mem = finfo.smem_len/1024; |