src/video/SDL_video.c
changeset 2909 3da0bb421d83
parent 2908 aa6ba38c1714
child 2910 27d8b12e0e8e
     1.1 --- a/src/video/SDL_video.c	Tue Dec 23 01:28:06 2008 +0000
     1.2 +++ b/src/video/SDL_video.c	Tue Dec 23 02:23:18 2008 +0000
     1.3 @@ -2119,19 +2119,15 @@
     1.4          SDL_Unsupported();
     1.5          return -1;
     1.6      }
     1.7 -#if 0
     1.8 -    //FIXME: Need line intersect routine
     1.9      window = SDL_GetWindowFromID(renderer->window);
    1.10 +
    1.11      real_rect.x = 0;
    1.12      real_rect.y = 0;
    1.13      real_rect.w = window->w;
    1.14      real_rect.h = window->h;
    1.15 -    if (rect) {
    1.16 -        if (!SDL_IntersectRect(rect, &real_rect, &real_rect)) {
    1.17 -            return 0;
    1.18 -        }
    1.19 +    if (!SDL_IntersectRectAndLine(&real_rect, &x1, &x2, &y1, &y2)) {
    1.20 +        return (0);
    1.21      }
    1.22 -#endif
    1.23      return renderer->RenderLine(renderer, x1, y1, x2, y2);
    1.24  }
    1.25