equal
deleted
inserted
replaced
939 begin |
939 begin |
940 SDL_WM_SetIcon(ico, 0); |
940 SDL_WM_SetIcon(ico, 0); |
941 SDL_FreeSurface(ico) |
941 SDL_FreeSurface(ico) |
942 end; |
942 end; |
943 |
943 |
944 // set window caption |
944 // set window title |
945 SDL_WM_SetCaption('Hedgewars', nil); |
945 SDL_WM_SetCaption('Hedgewars', nil); |
946 |
946 |
947 if SDLPrimSurface <> nil then |
947 if SDLPrimSurface <> nil then |
948 begin |
948 begin |
949 AddFileLog('Freeing old primary surface...'); |
949 AddFileLog('Freeing old primary surface...'); |
968 SDLwindow:= SDL_CreateWindow('Hedgewars', x, y, cScreenWidth, cScreenHeight, flags); |
968 SDLwindow:= SDL_CreateWindow('Hedgewars', x, y, cScreenWidth, cScreenHeight, flags); |
969 SDLTry(SDLwindow <> nil, true); |
969 SDLTry(SDLwindow <> nil, true); |
970 {$ELSE} |
970 {$ELSE} |
971 if not cOnlyStats then |
971 if not cOnlyStats then |
972 begin |
972 begin |
|
973 {$IFDEF WIN32} |
|
974 s:= SDL_getenv('SDL_VIDEO_CENTERED'); |
|
975 SDL_putenv('SDL_VIDEO_CENTERED=1'); |
|
976 {$ENDIF} |
973 SDLPrimSurface:= SDL_SetVideoMode(cScreenWidth, cScreenHeight, cBits, flags); |
977 SDLPrimSurface:= SDL_SetVideoMode(cScreenWidth, cScreenHeight, cBits, flags); |
974 SDLTry(SDLPrimSurface <> nil, true); |
978 SDLTry(SDLPrimSurface <> nil, true); |
|
979 {$IFDEF WIN32}SDL_putenv(str2pchar('SDL_VIDEO_CENTERED=' + s));{$ENDIF} |
975 end; |
980 end; |
976 {$ENDIF} |
981 {$ENDIF} |
977 |
982 |
978 AddFileLog('Setting up OpenGL (using driver: ' + shortstring(SDL_VideoDriverName(buf, sizeof(buf))) + ')'); |
983 AddFileLog('Setting up OpenGL (using driver: ' + shortstring(SDL_VideoDriverName(buf, sizeof(buf))) + ')'); |
979 SetupOpenGL(); |
984 SetupOpenGL(); |