Mercurial > sdl-ios-xcode
comparison src/video/directfb/SDL_DirectFB_window.c @ 3037:490f3e4fe753
Added DFB_VERSION_ATLEAST macro
First attempt at replacing MakeSubSurface for pre 1.2.0 ==> Scaling not yet working
author | Couriersud <couriersud@arcor.de> |
---|---|
date | Tue, 13 Jan 2009 21:17:38 +0000 |
parents | d72a0dd80e8b |
children | c73a5f8a03d2 |
comparison
equal
deleted
inserted
replaced
3036:76a1692fcec5 | 3037:490f3e4fe753 |
---|---|
418 if (cw != windata->size.w || ch != windata->size.h) { | 418 if (cw != windata->size.w || ch != windata->size.h) { |
419 adjust = 1; | 419 adjust = 1; |
420 } | 420 } |
421 | 421 |
422 if (adjust) { | 422 if (adjust) { |
423 SDL_DFB_CHECKERR(windata->window->ResizeSurface(windata->window, | 423 #if DFB_VERSION_ATLEAST(1,2,0) |
424 SDL_DFB_CHECKERR(windata->window->ResizeSurface(windata->window, | |
424 windata->size.w, | 425 windata->size.w, |
425 windata->size.h)); | 426 windata->size.h)); |
426 SDL_DFB_CHECKERR(windata->surface->MakeSubSurface(windata->surface, | 427 SDL_DFB_CHECKERR(windata->surface->MakeSubSurface(windata->surface, |
427 windata-> | 428 windata-> |
428 window_surface, | 429 window_surface, |
429 &windata->client)); | 430 &windata->client)); |
430 DirectFB_WM_RedrawLayout(window); | 431 #else |
432 /* recreate subsurface */ | |
433 windata->surface->ReleaseSource(windata->surface); | |
434 windata->window_surface->ReleaseSource(windata->window_surface); | |
435 SDL_DFB_RELEASE(windata->surface); | |
436 windata->surface = NULL; | |
437 SDL_DFB_CHECKERR(windata->window->ResizeSurface(windata->window, | |
438 windata->size.w, | |
439 windata->size.h)); | |
440 SDL_DFB_CHECKERR(windata->window_surface-> | |
441 GetSubSurface(windata->window_surface, &windata->client, | |
442 &windata->surface)); | |
443 #endif | |
444 DirectFB_WM_RedrawLayout(window); | |
431 } | 445 } |
432 error: | 446 error: |
433 return; | 447 return; |
434 } | 448 } |
435 | 449 |