D3D11: Fixed SDL_RenderDrawPoints() ignoring input after the first 128 points.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Thu, 15 Oct 2015 22:26:21 +0200
changeset 9896b0b12a3c817c
parent 9895 5725b4f2e79b
child 9897 b9b4c1bbb778
D3D11: Fixed SDL_RenderDrawPoints() ignoring input after the first 128 points.

If a limit would be needed then count should be adapted before stack allocation.
src/render/direct3d11/SDL_render_d3d11.c
     1.1 --- a/src/render/direct3d11/SDL_render_d3d11.c	Thu Oct 15 22:26:00 2015 +0200
     1.2 +++ b/src/render/direct3d11/SDL_render_d3d11.c	Thu Oct 15 22:26:21 2015 +0200
     1.3 @@ -2504,7 +2504,7 @@
     1.4      a = (float)(renderer->a / 255.0f);
     1.5  
     1.6      vertices = SDL_stack_alloc(VertexPositionColor, count);
     1.7 -    for (i = 0; i < min(count, 128); ++i) {
     1.8 +    for (i = 0; i < count; ++i) {
     1.9          const VertexPositionColor v = { { points[i].x, points[i].y, 0.0f }, { 0.0f, 0.0f }, { r, g, b, a } };
    1.10          vertices[i] = v;
    1.11      }