Backed out the viewport and cliprect changes in 9fb5a9ccac

This ended up being lots of application code churn without any real benefit in practice.
This commit is contained in:
Sam Lantinga
2024-06-12 19:08:06 -07:00
parent b2ccfc0b6f
commit 80a907e0e6
28 changed files with 238 additions and 275 deletions

View File

@@ -32,7 +32,7 @@ static void DrawChessBoard(void)
{
int row = 0, column = 0, x = 0;
SDL_FRect rect;
SDL_FRect darea;
SDL_Rect darea;
/* Get the Size of drawing surface */
SDL_GetRenderViewport(renderer, &darea);
@@ -43,10 +43,10 @@ static void DrawChessBoard(void)
for (; column < 4 + (row % 2); column++) {
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0xFF);
rect.w = (darea.w / 8);
rect.h = (darea.h / 8);
rect.x = (x * rect.w);
rect.y = (row * rect.h);
rect.w = (float)(darea.w / 8);
rect.h = (float)(darea.h / 8);
rect.x = (float)(x * rect.w);
rect.y = (float)(row * rect.h);
x = x + 2;
SDL_RenderFillRect(renderer, &rect);