X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fscreens.c;h=cc395c8fdfff1334e95d91e8d1579e5561e05a70;hb=077a063efbdea9755f17e7442115221aabe71503;hp=6655bd88ac34ea271f013a07917ae3033d981a36;hpb=8e8a0eddc70d1581ecbd18ff9bad3db3485956b7;p=rocksndiamonds.git diff --git a/src/screens.c b/src/screens.c index 6655bd88..cc395c8f 100644 --- a/src/screens.c +++ b/src/screens.c @@ -229,30 +229,6 @@ void DrawHeadline() DrawTextSCentered(MENU_TITLE2_YPOS, FONT_TITLE_2, PROGRAM_COPYRIGHT_STRING); } -static void ToggleFullscreenIfNeeded() -{ - if (setup.fullscreen != video.fullscreen_enabled) - { - /* save old door content */ - BlitBitmap(backbuffer, bitmap_db_door, - DX, DY, DXSIZE, DYSIZE, DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1); - - /* toggle fullscreen */ - ChangeVideoModeIfNeeded(setup.fullscreen); - setup.fullscreen = video.fullscreen_enabled; - - /* redraw background to newly created backbuffer */ - BlitBitmap(graphic_info[IMG_GLOBAL_BORDER].bitmap, backbuffer, - 0,0, WIN_XSIZE,WIN_YSIZE, 0,0); - - /* restore old door content */ - BlitBitmap(bitmap_db_door, backbuffer, - DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, DX, DY); - - redraw_mask = REDRAW_ALL; - } -} - static int getLastLevelButtonPos() { return 10; @@ -1781,7 +1757,7 @@ void DrawInfoScreen_Program() DrawTextSCentered(ystart + 1 * ystep, FONT_TEXT_2, "If you like it, send e-mail to:"); DrawTextSCentered(ystart + 2 * ystep, FONT_TEXT_3, - "info@artsoft.org"); + PROGRAM_EMAIL_STRING); DrawTextSCentered(ystart + 3 * ystep, FONT_TEXT_2, "or SnailMail to:"); DrawTextSCentered(ystart + 4 * ystep + 0, FONT_TEXT_3, @@ -1792,12 +1768,15 @@ void DrawInfoScreen_Program() "33604 Bielefeld"); DrawTextSCentered(ystart + 4 * ystep + 60, FONT_TEXT_3, "Germany"); - DrawTextSCentered(ystart + 7 * ystep, FONT_TEXT_2, + "More information and levels:"); + DrawTextSCentered(ystart + 8 * ystep, FONT_TEXT_3, + PROGRAM_WEBSITE_STRING); + DrawTextSCentered(ystart + 9 * ystep, FONT_TEXT_2, "If you have created new levels,"); - DrawTextSCentered(ystart + 8 * ystep, FONT_TEXT_2, + DrawTextSCentered(ystart + 10 * ystep, FONT_TEXT_2, "send them to me to include them!"); - DrawTextSCentered(ystart + 9 * ystep, FONT_TEXT_2, + DrawTextSCentered(ystart + 11 * ystep, FONT_TEXT_2, ":-)"); DrawTextSCentered(ybottom, FONT_TEXT_4, @@ -2560,15 +2539,18 @@ static void execSetupGraphics() for (i = 0; video.fullscreen_modes[i].width != -1; i++) { TreeInfo *ti = newTreeInfo_setDefaults(TREE_TYPE_UNDEFINED); - char identifier[20], name[20]; + char identifier[32], name[32]; int x = video.fullscreen_modes[i].width; int y = video.fullscreen_modes[i].height; + int xx, yy; + + get_aspect_ratio_from_screen_mode(&video.fullscreen_modes[i], &xx, &yy); ti->node_top = &screen_modes; - ti->sort_priority = x * y; + ti->sort_priority = x * 10000 + y; sprintf(identifier, "%dx%d", x, y); - sprintf(name, "%d x %d", x, y); + sprintf(name, "%d x %d [%d:%d]", x, y, xx, yy); setString(&ti->identifier, identifier); setString(&ti->name, name); @@ -2578,11 +2560,19 @@ static void execSetupGraphics() pushTreeInfo(&screen_modes, ti); } + /* sort fullscreen modes to start with lowest available screen resolution */ sortTreeInfo(&screen_modes); - /* set current screen mode for fullscreen mode to reliable default value */ + /* set current screen mode for fullscreen mode to configured setup value */ screen_mode_current = getTreeInfoFromIdentifier(screen_modes, - DEFAULT_FULLSCREEN_MODE); + setup.fullscreen_mode); + + /* if that fails, set current screen mode to reliable default value */ + if (screen_mode_current == NULL) + screen_mode_current = getTreeInfoFromIdentifier(screen_modes, + DEFAULT_FULLSCREEN_MODE); + + /* if that also fails, set current screen mode to first available mode */ if (screen_mode_current == NULL) screen_mode_current = screen_modes;