gterm: Fix typo on IMAGE_STRETCHED

This commit is contained in:
StaticSaga 2021-07-10 13:59:42 +02:00
parent 0daf11ecca
commit b38b830241

View File

@ -156,7 +156,7 @@ __attribute__((always_inline)) static inline void genloop(int xstart, int xend,
// so you can set x = xstart * ratio, and increment by ratio at each iteration
case IMAGE_STRETCHED:
for (int y = ystart; y < yend; y++) {
int img_y = y * img_width / gterm_width; // calculate Y with full precision
int img_y = (y * img_height) / gterm_height; // calculate Y with full precision
int off = img_pitch * (img_height - 1 - img_y);
int canvas_off = gterm_width * y, fb_off = gterm_pitch / 4 * y;