Skip to content

Commit

Permalink
Move vertical flip out of Con_ScreenToCanvas
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-drexler committed Nov 30, 2023
1 parent f1dea3d commit 4c6f7f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Quake/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,6 @@ static void Con_ScreenToCanvas (int x, int y, int *outx, int *outy)
x = (int) (px + 0.5f);
y = (int) (py + 0.5f);

y = vid.conheight - y;

*outx = x;
*outy = y;
}
Expand All @@ -178,6 +176,9 @@ static qboolean Con_ScreenToOffset (int x, int y, conofs_t *ofs, contest_t testm

Con_ScreenToCanvas (x, y, &x, &y);

// Start from the bottom of the console
y = vid.conheight - y;

// Apply rounding
if (testmode == CT_NEAREST)
x += 4;
Expand Down

0 comments on commit 4c6f7f9

Please sign in to comment.