程式語言 - Simple DirectMedia Layer (SDL) - v1.2 - SDL_FB_BROKEN_MODES用途



當特定的屏幕解析度(如:240x195)沒有在SDL預設清單時,可以設定SDL_FB_BROKEN_MODES環境變數,讓特定屏幕解析度加入清單

static int FB_VideoInit(_THIS, SDL_PixelFormat *vformat)
{
    ...
    if ( SDL_getenv("SDL_FB_BROKEN_MODES") != NULL ) {
        FB_AddMode(this, current_index, current_w, current_h, 0);
    }
    else if(modesdb) {
    ....
}