src/render/SDL_render.c
changeset 5157 657543cc92f9
parent 5156 307ccc9c135e
child 5158 b3ccd1947786
     1.1 --- a/src/render/SDL_render.c	Thu Feb 03 00:19:40 2011 -0800
     1.2 +++ b/src/render/SDL_render.c	Thu Feb 03 00:22:18 2011 -0800
     1.3 @@ -1212,45 +1212,6 @@
     1.4                                        format, pixels, pitch);
     1.5  }
     1.6  
     1.7 -int
     1.8 -SDL_RenderWritePixels(SDL_Renderer * renderer, const SDL_Rect * rect,
     1.9 -                      Uint32 format, const void * pixels, int pitch)
    1.10 -{
    1.11 -    SDL_Window *window;
    1.12 -    SDL_Rect real_rect;
    1.13 -
    1.14 -    CHECK_RENDERER_MAGIC(renderer, -1);
    1.15 -
    1.16 -    if (!renderer->RenderWritePixels) {
    1.17 -        SDL_Unsupported();
    1.18 -        return -1;
    1.19 -    }
    1.20 -    window = renderer->window;
    1.21 -
    1.22 -    if (!format) {
    1.23 -        format = SDL_GetWindowPixelFormat(window);
    1.24 -    }
    1.25 -
    1.26 -    real_rect.x = 0;
    1.27 -    real_rect.y = 0;
    1.28 -    SDL_GetWindowSize(window, &real_rect.w, &real_rect.h);
    1.29 -    if (rect) {
    1.30 -        if (!SDL_IntersectRect(rect, &real_rect, &real_rect)) {
    1.31 -            return 0;
    1.32 -        }
    1.33 -        if (real_rect.y > rect->y) {
    1.34 -            pixels = (const Uint8 *)pixels + pitch * (real_rect.y - rect->y);
    1.35 -        }
    1.36 -        if (real_rect.x > rect->x) {
    1.37 -            int bpp = SDL_BYTESPERPIXEL(SDL_GetWindowPixelFormat(window));
    1.38 -            pixels = (const Uint8 *)pixels + bpp * (real_rect.x - rect->x);
    1.39 -        }
    1.40 -    }
    1.41 -
    1.42 -    return renderer->RenderWritePixels(renderer, &real_rect,
    1.43 -                                       format, pixels, pitch);
    1.44 -}
    1.45 -
    1.46  void
    1.47  SDL_RenderPresent(SDL_Renderer * renderer)
    1.48  {