src/render/SDL_render.c
changeset 12383 f6430feceeda
parent 12382 03d0bddca61b
child 12447 0844007ea1c2
     1.1 --- a/src/render/SDL_render.c	Thu Nov 01 12:31:45 2018 -0400
     1.2 +++ b/src/render/SDL_render.c	Thu Nov 01 20:04:24 2018 +0300
     1.3 @@ -2165,14 +2165,18 @@
     1.4  int
     1.5  SDL_RenderDrawPoint(SDL_Renderer * renderer, int x, int y)
     1.6  {
     1.7 -    const SDL_FPoint fpoint = { (float) x, (float) y };
     1.8 +    SDL_FPoint fpoint;
     1.9 +    fpoint.x = (float) x;
    1.10 +    fpoint.y = (float) y;
    1.11      return SDL_RenderDrawPointsF(renderer, &fpoint, 1);
    1.12  }
    1.13  
    1.14  int
    1.15  SDL_RenderDrawPointF(SDL_Renderer * renderer, float x, float y)
    1.16  {
    1.17 -    const SDL_FPoint fpoint = { x, y };
    1.18 +    SDL_FPoint fpoint;
    1.19 +    fpoint.x = x;
    1.20 +    fpoint.y = y;
    1.21      return SDL_RenderDrawPointsF(renderer, &fpoint, 1);
    1.22  }
    1.23  
    1.24 @@ -2319,14 +2323,22 @@
    1.25  int
    1.26  SDL_RenderDrawLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2)
    1.27  {
    1.28 -    const SDL_FPoint points[2] = { { (float) x1, (float) y1 }, { (float) x2, (float) y2 } };
    1.29 +    SDL_FPoint points[2];
    1.30 +    points[0].x = (float) x1;
    1.31 +    points[0].y = (float) y1;
    1.32 +    points[1].x = (float) x2;
    1.33 +    points[1].y = (float) y2;
    1.34      return SDL_RenderDrawLinesF(renderer, points, 2);
    1.35  }
    1.36  
    1.37  int
    1.38  SDL_RenderDrawLineF(SDL_Renderer * renderer, float x1, float y1, float x2, float y2)
    1.39  {
    1.40 -    const SDL_FPoint points[2] = { { x1, y1 }, { x2, y2 } };
    1.41 +    SDL_FPoint points[2];
    1.42 +    points[0].x = x1;
    1.43 +    points[0].y = y1;
    1.44 +    points[1].x = x2;
    1.45 +    points[1].y = y2;
    1.46      return SDL_RenderDrawLinesF(renderer, points, 2);
    1.47  }
    1.48