equal
deleted
inserted
replaced
680 var flags: Longword = 0; |
680 var flags: Longword = 0; |
681 ico: PSDL_Surface; |
681 ico: PSDL_Surface; |
682 {$IFDEF DEBUGFILE} |
682 {$IFDEF DEBUGFILE} |
683 buf: array[byte] of char; |
683 buf: array[byte] of char; |
684 {$ENDIF} |
684 {$ENDIF} |
685 {$IFDEF SDL13} |
|
686 window: PSDL_Window; |
|
687 {$ENDIF} |
|
688 begin |
685 begin |
689 s:= s; // avoid compiler hint |
686 s:= s; // avoid compiler hint |
690 if Length(s) = 0 then cFullScreen:= not cFullScreen |
687 if Length(s) = 0 then cFullScreen:= not cFullScreen |
691 else cFullScreen:= s = '1'; |
688 else cFullScreen:= s = '1'; |
692 |
689 |
732 SDL_FreeSurface(SDLPrimSurface); |
729 SDL_FreeSurface(SDLPrimSurface); |
733 SDLPrimSurface:= nil; |
730 SDLPrimSurface:= nil; |
734 end; |
731 end; |
735 |
732 |
736 {$IFDEF SDL13} |
733 {$IFDEF SDL13} |
737 window:= SDL_CreateWindow('Hedgewars', 0, 0, cScreenWidth, cScreenHeight, |
734 if SDLwindow = nil then |
738 SDL_WINDOW_OPENGL or SDL_WINDOW_SHOWN |
735 begin |
739 {$IFDEF IPHONEOS} or SDL_WINDOW_BORDERLESS{$ENDIF}); |
736 SDLwindow:= SDL_CreateWindow('Hedgewars', 0, 0, cScreenWidth, cScreenHeight, |
740 SDL_CreateRenderer(window, -1, 0); |
737 SDL_WINDOW_OPENGL or SDL_WINDOW_SHOWN |
|
738 {$IFDEF IPHONEOS} or SDL_WINDOW_BORDERLESS{$ENDIF}); |
|
739 SDL_CreateRenderer(SDLwindow, -1, 0); |
|
740 end; |
741 |
741 |
742 SDL_SetRenderDrawColor(0, 0, 0, 255); |
742 SDL_SetRenderDrawColor(0, 0, 0, 255); |
743 SDL_RenderFill(nil); |
743 SDL_RenderFill(nil); |
744 SDL_RenderPresent(); |
744 SDL_RenderPresent(); |
745 {$ELSE} |
745 {$ELSE} |