hedgewars/uStore.pas
changeset 5052 74a81c276d67
parent 5045 f215eb5d4b75
child 5109 6d2e8a24277e
equal deleted inserted replaced
5051:7b5fa8d3c904 5052:74a81c276d67
   880 
   880 
   881 procedure chFullScr(var s: shortstring);
   881 procedure chFullScr(var s: shortstring);
   882 var flags: Longword = 0;
   882 var flags: Longword = 0;
   883     ico: PSDL_Surface;
   883     ico: PSDL_Surface;
   884     buf: array[byte] of char;
   884     buf: array[byte] of char;
   885     x, y: LongInt;
   885     {$IFDEF SDL13}x, y: LongInt;{$ENDIF}
   886 begin
   886 begin
   887     s:= s; // avoid compiler hint
   887     s:= s; // avoid compiler hint
   888     if Length(s) = 0 then cFullScreen:= not cFullScreen
   888     if Length(s) = 0 then cFullScreen:= not cFullScreen
   889     else cFullScreen:= s = '1';
   889     else cFullScreen:= s = '1';
   890 
   890 
   926 {$IFDEF SDL13}
   926 {$IFDEF SDL13}
   927     if SDLwindow = nil then
   927     if SDLwindow = nil then
   928     begin
   928     begin
   929         // the values in x and y make the window appear in the center
   929         // the values in x and y make the window appear in the center
   930         // on ios, make the sdl window appear on the second monitor when present
   930         // on ios, make the sdl window appear on the second monitor when present
   931         x:= (SDL_WINDOWPOS_CENTERED_MASK or {$IFDEF IPHONEOS}SDL_GetNumVideoDisplays() - 1){$ELSE}0{$ENDIF});
   931         x:= (SDL_WINDOWPOS_CENTERED_MASK or {$IFDEF IPHONEOS}(SDL_GetNumVideoDisplays() - 1){$ELSE}0{$ENDIF});
   932         y:= (SDL_WINDOWPOS_CENTERED_MASK or {$IFDEF IPHONEOS}SDL_GetNumVideoDisplays() - 1){$ELSE}0{$ENDIF});
   932         y:= (SDL_WINDOWPOS_CENTERED_MASK or {$IFDEF IPHONEOS}(SDL_GetNumVideoDisplays() - 1){$ELSE}0{$ENDIF});
   933         SDLwindow:= SDL_CreateWindow('Hedgewars', x, y, cScreenWidth, cScreenHeight, SDL_WINDOW_OPENGL or SDL_WINDOW_SHOWN
   933         SDLwindow:= SDL_CreateWindow('Hedgewars', x, y, cScreenWidth, cScreenHeight, SDL_WINDOW_OPENGL or SDL_WINDOW_SHOWN
   934                         {$IFDEF IPHONEOS} or SDL_WINDOW_BORDERLESS {$ENDIF});
   934                         {$IFDEF IPHONEOS} or SDL_WINDOW_BORDERLESS {$ENDIF});
   935         SDLrender:= SDL_CreateRenderer(SDLwindow, -1, SDL_RENDERER_ACCELERATED or SDL_RENDERER_PRESENTVSYNC);
   935         SDLrender:= SDL_CreateRenderer(SDLwindow, -1, SDL_RENDERER_ACCELERATED or SDL_RENDERER_PRESENTVSYNC);
   936     end;
   936     end;
   937 
   937