hedgewars/CCHandlers.inc
changeset 753 40fc0deb388f
parent 691 0a534a03437e
child 764 7513452b1d51
equal deleted inserted replaced
752:69f1dc50a1fa 753:40fc0deb388f
   423 {$ENDIF}
   423 {$ENDIF}
   424 begin
   424 begin
   425 if Length(s) = 0 then cFullScreen:= not cFullScreen
   425 if Length(s) = 0 then cFullScreen:= not cFullScreen
   426                  else cFullScreen:= s = '1';
   426                  else cFullScreen:= s = '1';
   427 
   427 
   428 flags:= SDL_HWSURFACE or SDL_DOUBLEBUF or SDL_HWACCEL;
   428 SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
       
   429 
       
   430 flags:= SDL_OPENGL;
   429 if cFullScreen then flags:= flags or SDL_FULLSCREEN
   431 if cFullScreen then flags:= flags or SDL_FULLSCREEN
   430                else SDL_WM_SetCaption('Hedgewars', nil);
   432                else SDL_WM_SetCaption('Hedgewars', nil);
   431 SDL_FreeSurface(SDLPrimSurface);
   433 SDL_FreeSurface(SDLPrimSurface);
   432 SDLPrimSurface:= SDL_SetVideoMode(cScreenWidth, cScreenHeight, cBits, flags);
   434 SDLPrimSurface:= SDL_SetVideoMode(cScreenWidth, cScreenHeight, cBits, flags);
       
   435 
       
   436 SetupOpenGL();
   433 
   437 
   434 {$IFDEF DEBUGFILE}
   438 {$IFDEF DEBUGFILE}
   435 AddFileLog('SDL video driver: ' + string(SDL_VideoDriverName(buf, sizeof(buf))));
   439 AddFileLog('SDL video driver: ' + string(SDL_VideoDriverName(buf, sizeof(buf))));
   436 {$ENDIF}
   440 {$ENDIF}
   437 TryDo(SDLPrimSurface <> nil, errmsgCreateSurface, true);
   441 TryDo(SDLPrimSurface <> nil, errmsgCreateSurface, true);