980 SDL_FreeSurface(ico) |
980 SDL_FreeSurface(ico) |
981 end; |
981 end; |
982 end |
982 end |
983 else |
983 else |
984 begin |
984 begin |
|
985 SetScale(cDefaultZoomLevel); |
985 {$IF DEFINED(DARWIN) OR DEFINED(WIN32)} |
986 {$IF DEFINED(DARWIN) OR DEFINED(WIN32)} |
986 reinit:= true; |
987 reinit:= true; |
987 {$ENDIF} |
988 {$ENDIF} |
988 AddFileLog('Freeing old primary surface...'); |
989 AddFileLog('Freeing old primary surface...'); |
989 SDL_FreeSurface(SDLPrimSurface); |
990 SDL_FreeSurface(SDLPrimSurface); |
990 SDLPrimSurface:= nil; |
991 SDLPrimSurface:= nil; |
991 end; |
992 end; |
992 |
993 |
993 // these attributes must be set up before creating the sdl window |
994 // these attributes must be set up before creating the sdl window |
|
995 {$IFNDEF WIN32} |
|
996 (* On a large number of testers machines, SDL default to software rendering when opengl attributes were set. |
|
997 These attributes were "set" after CreateWindow in .15, which probably did nothing. |
|
998 IMO we should rely on the gl_config defaults from SDL, and use SDL_GL_GetAttribute to possibly post warnings if any |
|
999 bad values are set. *) |
994 SetupOpenGLAttributes(); |
1000 SetupOpenGLAttributes(); |
|
1001 {$ENDIF} |
995 {$IFDEF SDL13} |
1002 {$IFDEF SDL13} |
996 // these values in x and y make the window appear in the center |
1003 // these values in x and y make the window appear in the center |
997 x:= SDL_WINDOWPOS_CENTERED_MASK; |
1004 x:= SDL_WINDOWPOS_CENTERED_MASK; |
998 y:= SDL_WINDOWPOS_CENTERED_MASK; |
1005 y:= SDL_WINDOWPOS_CENTERED_MASK; |
999 flags:= SDL_WINDOW_OPENGL or SDL_WINDOW_SHOWN; |
1006 flags:= SDL_WINDOW_OPENGL or SDL_WINDOW_SHOWN; |