mirror of https://github.com/snes9xgit/snes9x.git
Win32: fix osd for all hires filter scales
This commit is contained in:
parent
481bf0647f
commit
f1b7d31c8e
|
@ -789,7 +789,7 @@ void WinDisplayStringFromBottom (const char *string, int linesFromBottom, int pi
|
||||||
|
|
||||||
static int font_width = 8, font_height = 9;
|
static int font_width = 8, font_height = 9;
|
||||||
static void *displayScreen;
|
static void *displayScreen;
|
||||||
int displayPpl, displayWidth, displayHeight, displayScale,fontwidth_scaled,fontheight_scaled;
|
int displayPpl, displayWidth, displayHeight, displayScale, fontwidth_scaled, fontheight_scaled;
|
||||||
|
|
||||||
void WinSetCustomDisplaySurface(void *screen, int ppl, int width, int height, int scale)
|
void WinSetCustomDisplaySurface(void *screen, int ppl, int width, int height, int scale)
|
||||||
{
|
{
|
||||||
|
@ -797,7 +797,7 @@ void WinSetCustomDisplaySurface(void *screen, int ppl, int width, int height, in
|
||||||
displayPpl=ppl;
|
displayPpl=ppl;
|
||||||
displayWidth=width;
|
displayWidth=width;
|
||||||
displayHeight=height;
|
displayHeight=height;
|
||||||
displayScale=scale;
|
displayScale=max(1,width/IPPU.RenderedScreenWidth);
|
||||||
fontwidth_scaled=font_width*displayScale;
|
fontwidth_scaled=font_width*displayScale;
|
||||||
fontheight_scaled=font_height*displayScale;
|
fontheight_scaled=font_height*displayScale;
|
||||||
}
|
}
|
||||||
|
@ -926,7 +926,7 @@ void WinDisplayStringInBuffer (const char *string, int linesFromBottom, int pixe
|
||||||
if (linesFromBottom <= 0)
|
if (linesFromBottom <= 0)
|
||||||
linesFromBottom = 1;
|
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 len = strlen(string);
|
||||||
int max_chars = displayWidth / (fontwidth_scaled - displayScale);
|
int max_chars = displayWidth / (fontwidth_scaled - displayScale);
|
||||||
|
|
Loading…
Reference in New Issue