Win32: fix osd for all hires filter scales

This commit is contained in:
OV2 2011-03-04 00:38:16 +01:00
parent 481bf0647f
commit f1b7d31c8e
1 changed files with 3 additions and 3 deletions

View File

@ -797,7 +797,7 @@ void WinSetCustomDisplaySurface(void *screen, int ppl, int width, int height, in
displayPpl=ppl;
displayWidth=width;
displayHeight=height;
displayScale=scale;
displayScale=max(1,width/IPPU.RenderedScreenWidth);
fontwidth_scaled=font_width*displayScale;
fontheight_scaled=font_height*displayScale;
}
@ -926,7 +926,7 @@ void WinDisplayStringInBuffer (const char *string, int linesFromBottom, int pixe
if (linesFromBottom <= 0)
linesFromBottom = 1;
screenPtrType *dst = (screenPtrType *)displayScreen + (displayHeight - fontheight_scaled * linesFromBottom) * displayPpl + (int)(pixelsFromLeft * (2*(float)displayWidth/IPPU.RenderedScreenWidth - displayScale));
screenPtrType *dst = (screenPtrType *)displayScreen + (displayHeight - fontheight_scaled * linesFromBottom) * displayPpl + (int)(pixelsFromLeft * (float)displayWidth/IPPU.RenderedScreenWidth);
int len = strlen(string);
int max_chars = displayWidth / (fontwidth_scaled - displayScale);