Skip to content

Commit

Permalink
D3D11: Fixed SDL_RenderDrawPoints() ignoring input after the first 12…
Browse files Browse the repository at this point in the history
…8 points.

If a limit would be needed then count should be adapted before stack allocation.
  • Loading branch information
philippwiesemann committed Oct 15, 2015
1 parent 2a4855f commit 4c72d39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/render/direct3d11/SDL_render_d3d11.c
Expand Up @@ -2504,7 +2504,7 @@ D3D11_RenderDrawPoints(SDL_Renderer * renderer,
a = (float)(renderer->a / 255.0f);

vertices = SDL_stack_alloc(VertexPositionColor, count);
for (i = 0; i < min(count, 128); ++i) {
for (i = 0; i < count; ++i) {
const VertexPositionColor v = { { points[i].x, points[i].y, 0.0f }, { 0.0f, 0.0f }, { r, g, b, a } };
vertices[i] = v;
}
Expand Down

0 comments on commit 4c72d39

Please sign in to comment.