mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-25 01:57:47 +01:00
keep old maintas setting working for cutscenes
This commit is contained in:
parent
a556262670
commit
896c2f5def
@ -889,11 +889,23 @@ int WINAPI fake_StretchDIBits(
|
|||||||
}
|
}
|
||||||
else if (g_ddraw->width > 0 && g_ddraw->render.hdc)
|
else if (g_ddraw->width > 0 && g_ddraw->render.hdc)
|
||||||
{
|
{
|
||||||
int base_width = g_ddraw->height * 4.0/3.0;
|
// new logic by emoon
|
||||||
double scaling_factor = (double)g_ddraw->render.height / g_ddraw->height;
|
// g_ddraw->width check detects new widescreen patch
|
||||||
DestWidth = base_width * scaling_factor;
|
if (g_ddraw->width > 640 && g_config.maintas)
|
||||||
DestHeight = g_ddraw->render.height;
|
{
|
||||||
xDest += (g_ddraw->render.width - DestWidth) / 2;
|
int base_width = g_ddraw->height * 4.0 / 3.0;
|
||||||
|
double scaling_factor = (double)g_ddraw->render.height / g_ddraw->height;
|
||||||
|
DestWidth = base_width * scaling_factor;
|
||||||
|
DestHeight = g_ddraw->render.height;
|
||||||
|
xDest += (g_ddraw->render.width - DestWidth) / 2;
|
||||||
|
}
|
||||||
|
else // original 4:3 logic
|
||||||
|
{
|
||||||
|
xDest += g_ddraw->render.viewport.x;
|
||||||
|
yDest += g_ddraw->render.viewport.y;
|
||||||
|
DestWidth = (int)(DestWidth * g_ddraw->render.scale_w);
|
||||||
|
DestHeight = (int)(DestHeight * g_ddraw->render.scale_h);
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
real_StretchDIBits(
|
real_StretchDIBits(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user