Commit 0f598a33 authored by Sam Lantinga's avatar Sam Lantinga

Oh, Polyline() uses a pen, not a brush. Doh! :)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403520
parent a9ca68d6
...@@ -673,7 +673,7 @@ GDI_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2) ...@@ -673,7 +673,7 @@ GDI_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2)
{ {
GDI_RenderData *data = (GDI_RenderData *) renderer->driverdata; GDI_RenderData *data = (GDI_RenderData *) renderer->driverdata;
POINT points[2]; POINT points[2];
HBRUSH brush; HPEN pen;
BOOL status; BOOL status;
if (data->makedirty) { if (data->makedirty) {
...@@ -696,15 +696,15 @@ GDI_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2) ...@@ -696,15 +696,15 @@ GDI_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2)
SDL_AddDirtyRect(&data->dirty, &rect); SDL_AddDirtyRect(&data->dirty, &rect);
} }
/* Should we cache the brushes? .. it looks like GDI does for us. :) */ /* Should we cache the pen? .. it looks like GDI does for us. :) */
brush = CreateSolidBrush(RGB(renderer->r, renderer->g, renderer->b)); pen = CreatePen(PS_SOLID, 1, RGB(renderer->r, renderer->g, renderer->b));
SelectObject(data->current_hdc, brush); SelectObject(data->current_hdc, pen);
points[0].x = x1; points[0].x = x1;
points[0].y = y1; points[0].y = y1;
points[1].x = x2; points[1].x = x2;
points[1].y = y2; points[1].y = y2;
status = Polyline(data->current_hdc, points, 2); status = Polyline(data->current_hdc, points, 2);
DeleteObject(brush); DeleteObject(pen);
if (!status) { if (!status) {
WIN_SetError("FillRect()"); WIN_SetError("FillRect()");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment