mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- Fixed: Clean scaling at 720x480 looked borked.
SVN r602 (trunk)
This commit is contained in:
parent
c087e4d411
commit
4c8bf4552a
2 changed files with 28 additions and 3 deletions
|
@ -1,7 +1,10 @@
|
|||
December 17, 2007
|
||||
- Fixed: Clean scaling at 720x480 looked borked.
|
||||
- New: When using the D3D9 framebuffer, palette blending is now applied only
|
||||
to the 3D area of the screen. This means the console and (the primary
|
||||
rectangular area of) the status bar are no longer blended.
|
||||
rectangular area of) the status bar are no longer blended. Maybe somedays
|
||||
when I'm feeling adventurous, I'll exclude all the 2D graphics from the
|
||||
blending.
|
||||
|
||||
December 17, 2007 (Changes by Graf Zahl)
|
||||
- Fixed: When a skybox viewpoint is destroyed it should clear all
|
||||
|
|
|
@ -772,6 +772,11 @@ void DFrameBuffer::SetVSync (bool vsync)
|
|||
{
|
||||
}
|
||||
|
||||
CCMD(clean)
|
||||
{
|
||||
Printf ("CleanXfac: %d\nCleanYfac: %d\n", CleanXfac, CleanYfac);
|
||||
}
|
||||
|
||||
//
|
||||
// V_SetResolution
|
||||
//
|
||||
|
@ -792,6 +797,7 @@ bool V_DoModeSetup (int width, int height, int bits)
|
|||
int ratio;
|
||||
int cwidth;
|
||||
int cheight;
|
||||
int cx1, cy1, cx2, cy2;
|
||||
|
||||
ratio = CheckRatio (width, height);
|
||||
if (ratio & 4)
|
||||
|
@ -804,8 +810,22 @@ bool V_DoModeSetup (int width, int height, int bits)
|
|||
cwidth = width * BaseRatioSizes[ratio][3] / 48;
|
||||
cheight = height;
|
||||
}
|
||||
CleanXfac = MAX (cwidth / 320, 1);
|
||||
CleanYfac = MAX (cheight / 200, 1);
|
||||
// Use whichever pair of cwidth/cheight or width/height that produces less difference
|
||||
// between CleanXfac and CleanYfac.
|
||||
cx1 = MAX(cwidth / 320, 1);
|
||||
cy1 = MAX(cheight / 200, 1);
|
||||
cx2 = MAX(width / 320, 1);
|
||||
cy2 = MAX(height / 200, 1);
|
||||
if (abs(cx1 - cy1) <= abs(cx2 - cy2))
|
||||
{ // e.g. 640x360 looks better with this.
|
||||
CleanXfac = cx1;
|
||||
CleanYfac = cy1;
|
||||
}
|
||||
else
|
||||
{ // e.g. 720x480 looks better with this.
|
||||
CleanXfac = cx2;
|
||||
CleanYfac = cy2;
|
||||
}
|
||||
}
|
||||
|
||||
if (CleanXfac > 1 && CleanYfac > 1 && CleanXfac != CleanYfac)
|
||||
|
@ -818,6 +838,8 @@ bool V_DoModeSetup (int width, int height, int bits)
|
|||
|
||||
CleanWidth = width / CleanXfac;
|
||||
CleanHeight = height / CleanYfac;
|
||||
assert(CleanWidth >= 320);
|
||||
assert(CleanHeight >= 200);
|
||||
|
||||
DisplayWidth = width;
|
||||
DisplayHeight = height;
|
||||
|
|
Loading…
Reference in a new issue