equal
deleted
inserted
replaced
317 *w = _resolutions[best][0]; |
317 *w = _resolutions[best][0]; |
318 *h = _resolutions[best][1]; |
318 *h = _resolutions[best][1]; |
319 return 2; |
319 return 2; |
320 } |
320 } |
321 |
321 |
|
322 extern const char _openttd_revision[]; |
|
323 |
322 static bool CreateMainSurface(int w, int h) |
324 static bool CreateMainSurface(int w, int h) |
323 { |
325 { |
324 SDL_Surface *newscreen; |
326 SDL_Surface *newscreen; |
|
327 char *caption; |
325 |
328 |
326 GetAvailableVideoMode(&w, &h); |
329 GetAvailableVideoMode(&w, &h); |
327 |
330 |
328 DEBUG(misc, 1) ("sdl: using mode %dx%d", w, h); |
331 DEBUG(misc, 1) ("sdl: using mode %dx%d", w, h); |
329 |
332 |
337 _screen.pitch = newscreen->pitch; |
340 _screen.pitch = newscreen->pitch; |
338 |
341 |
339 _sdl_screen = newscreen; |
342 _sdl_screen = newscreen; |
340 InitPalette(); |
343 InitPalette(); |
341 |
344 |
342 SDL_CALL SDL_WM_SetCaption("OpenTTD", "OpenTTD"); |
345 caption = str_fmt("OpenTTD %s", _openttd_revision); |
|
346 SDL_CALL SDL_WM_SetCaption(caption, caption); |
343 SDL_CALL SDL_ShowCursor(0); |
347 SDL_CALL SDL_ShowCursor(0); |
344 |
348 |
345 GameSizeChanged(); |
349 GameSizeChanged(); |
346 |
350 |
347 return true; |
351 return true; |