src/video/SDL_video.c
changeset 2927 2133d2d300fd
parent 2918 bd518fc76f28
child 2928 e171ce9bdbad
     1.1 --- a/src/video/SDL_video.c	Tue Dec 30 04:38:39 2008 +0000
     1.2 +++ b/src/video/SDL_video.c	Tue Dec 30 07:14:11 2008 +0000
     1.3 @@ -1987,16 +1987,15 @@
     1.4      if (!renderer) {
     1.5          return -1;
     1.6      }
     1.7 -    if (!renderer->SetDrawColor) {
     1.8 -        SDL_Unsupported();
     1.9 -        return -1;
    1.10 -    }
    1.11      renderer->r = r;
    1.12      renderer->g = g;
    1.13      renderer->b = b;
    1.14      renderer->a = a;
    1.15 -    renderer->SetDrawColor(renderer);
    1.16 -    return 0;
    1.17 +    if (renderer->SetDrawColor) {
    1.18 +        return renderer->SetDrawColor(renderer);
    1.19 +    } else {
    1.20 +        return 0;
    1.21 +    }
    1.22  }
    1.23  
    1.24  int
    1.25 @@ -2012,10 +2011,6 @@
    1.26      if (!renderer) {
    1.27          return -1;
    1.28      }
    1.29 -    if (!renderer->SetDrawColor) {
    1.30 -        SDL_Unsupported();
    1.31 -        return -1;
    1.32 -    }
    1.33      if (r) {
    1.34          *r = renderer->r;
    1.35      }
    1.36 @@ -2028,7 +2023,6 @@
    1.37      if (a) {
    1.38          *a = renderer->a;
    1.39      }
    1.40 -    return 0;
    1.41  }
    1.42  
    1.43  int
    1.44 @@ -2044,13 +2038,12 @@
    1.45      if (!renderer) {
    1.46          return -1;
    1.47      }
    1.48 -    if (!renderer->SetDrawBlendMode) {
    1.49 -        SDL_Unsupported();
    1.50 -        return -1;
    1.51 +    renderer->blendMode = blendMode;
    1.52 +    if (renderer->SetDrawBlendMode) {
    1.53 +        return renderer->SetDrawBlendMode(renderer);
    1.54 +    } else {
    1.55 +        return 0;
    1.56      }
    1.57 -    renderer->blendMode = blendMode;
    1.58 -    renderer->SetDrawBlendMode(renderer);
    1.59 -    return 0;
    1.60  }
    1.61  
    1.62  int