Added Darkfalz's aspect ratio code.
This commit is contained in:
@@ -1357,24 +1357,34 @@ int InitDirectDraw()
|
||||
if ( GUIHQ4X[cvidmode] != 0 ) HQMode=4;
|
||||
}
|
||||
|
||||
if (FullScreen == 1 && DSMode == 0)
|
||||
{
|
||||
if ( HQMode != 0 )
|
||||
{
|
||||
int marginx = (rcWindow.right - rcWindow.left - BlitArea.right + BlitArea.left)/2;
|
||||
int marginy = (rcWindow.bottom - rcWindow.top - BlitArea.bottom + BlitArea.top)/2;
|
||||
if (marginx>0)
|
||||
{
|
||||
rcWindow.left += marginx;
|
||||
rcWindow.right -= marginx;
|
||||
}
|
||||
if (marginy>0)
|
||||
{
|
||||
rcWindow.top += marginy;
|
||||
rcWindow.bottom -= marginy;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (FullScreen == 1)
|
||||
{
|
||||
if (HQMode && !DSMode)
|
||||
{
|
||||
int marginx = (rcWindow.right - rcWindow.left - BlitArea.right + BlitArea.left)/2;
|
||||
int marginy = (rcWindow.bottom - rcWindow.top - BlitArea.bottom + BlitArea.top)/2;
|
||||
if (marginx>0)
|
||||
{
|
||||
rcWindow.left += marginx;
|
||||
rcWindow.right -= marginx;
|
||||
}
|
||||
if (marginy>0)
|
||||
{
|
||||
rcWindow.top += marginy;
|
||||
rcWindow.bottom -= marginy;
|
||||
}
|
||||
}
|
||||
if (DSMode == 1 || SMode == 1)
|
||||
{
|
||||
int windowy = rcWindow.bottom - rcWindow.top;
|
||||
int marginy = (windowy - (double(windowy)/240.0)*224.0)/2;
|
||||
if (marginy>0)
|
||||
{
|
||||
rcWindow.top += marginy;
|
||||
rcWindow.bottom -= marginy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pDirectDrawCreateEx(NULL, (void **)&lpDD, IID_IDirectDraw7, NULL) != DD_OK)
|
||||
{
|
||||
@@ -1995,9 +2005,9 @@ void initwinvideo(void)
|
||||
ClientToScreen(hMainWindow, (LPPOINT) &rcWindow);
|
||||
ClientToScreen(hMainWindow, (LPPOINT) &rcWindow + 1);
|
||||
|
||||
if (FullScreen == 1 && DSMode == 0)
|
||||
if (FullScreen == 1)
|
||||
{
|
||||
if ( HQMode != 0 )
|
||||
if (HQMode && !DSMode)
|
||||
{
|
||||
int marginx = (rcWindow.right - rcWindow.left - BlitArea.right + BlitArea.left)/2;
|
||||
int marginy = (rcWindow.bottom - rcWindow.top - BlitArea.bottom + BlitArea.top)/2;
|
||||
@@ -2011,8 +2021,18 @@ void initwinvideo(void)
|
||||
rcWindow.top += marginy;
|
||||
rcWindow.bottom -= marginy;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (DSMode == 1 || SMode == 1)
|
||||
{
|
||||
int windowy = rcWindow.bottom - rcWindow.top;
|
||||
int marginy = (windowy - (double(windowy)/240.0)*224.0)/2;
|
||||
if (marginy>0)
|
||||
{
|
||||
rcWindow.top += marginy;
|
||||
rcWindow.bottom -= marginy;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user