X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_options.pas;h=e732eed074c4687773a1de38e1925a08366c0e2d;hp=2e268a0c3e69317b51a1a76bf05b607082479889;hb=23c3f9ee3fc3837cd1d0380496a2e1b0f87833d8;hpb=dea4e2426106ed2b46c3799c7b34a358a4c303aa diff --git a/src/game/g_options.pas b/src/game/g_options.pas index 2e268a0..e732eed 100644 --- a/src/game/g_options.pas +++ b/src/game/g_options.pas @@ -162,13 +162,26 @@ var percentage: Integer; begin (* Display 0 = Primary display *) - SDL_GetDesktopDisplayMode(0, @display); + if SDL_GetDesktopDisplayMode(0, @display) <> 0 then + begin + display.format := SDL_PIXELFORMAT_UNKNOWN; + display.w := 640; + display.h := 480; + display.refresh_rate := 0; + display.driverdata := nil + end; {$IF DEFINED(ANDROID)} gScreenWidth := display.w; gScreenHeight := display.h; - //gBPP := SDL_BITSPERPIXEL(dispaly.format); - gBPP := 32; + gBPP := SDL_BITSPERPIXEL(dispaly.format); + if gBPP = 0 then gBPP := 32; gFullScreen := True; (* rotation not allowed? *) + {$ELSEIF DEFINED(GO32V2)} + gScreenWidth := display.w; + gScreenHeight := display.h; + gBPP := SDL_BITSPERPIXEL(display.format); + if gBPP = 0 then gBPP := 8; + gFullScreen := False; (* Do not change videomode twice *) {$ELSE} (* Window must be smaller than display *) closest.w := display.w;