corrected issue with screen aspect ratio on CG50 during upscaling

This commit is contained in:
Sylvain PILLOT 2023-03-13 22:22:36 +01:00
parent 69b5478e40
commit 469be10609
1 changed files with 3 additions and 2 deletions

View File

@ -54,14 +54,15 @@ void dgetvram(uint16_t **ptr_vram_1, uint16_t **ptr_vram_2)
inline drawupscale( int x, int y, int color )
{
int u=y*396*3*2;
int u=y*396*3;
int v=x*3;
uint16_t colorcg;
if (color==C_WHITE) colorcg=0xFFFF;
else colorcg=0x0000;
int baseindex = (396*16+6+x+u); // 16 lines on top/bottom remain black and 6 columns on left/right remain black
int baseindex = (396*16+6+v+u); // 16 lines on top/bottom remain black and 6 columns on left/right remain black
cg_vram[baseindex] = colorcg;
cg_vram[baseindex+1] = colorcg;
cg_vram[baseindex+2] = colorcg;