Added Darkfalz's aspect ratio code.
This commit is contained in:
@@ -1357,9 +1357,9 @@ int InitDirectDraw()
|
|||||||
if ( GUIHQ4X[cvidmode] != 0 ) HQMode=4;
|
if ( GUIHQ4X[cvidmode] != 0 ) HQMode=4;
|
||||||
}
|
}
|
||||||
|
|
||||||
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 marginx = (rcWindow.right - rcWindow.left - BlitArea.right + BlitArea.left)/2;
|
||||||
int marginy = (rcWindow.bottom - rcWindow.top - BlitArea.bottom + BlitArea.top)/2;
|
int marginy = (rcWindow.bottom - rcWindow.top - BlitArea.bottom + BlitArea.top)/2;
|
||||||
@@ -1374,6 +1374,16 @@ int InitDirectDraw()
|
|||||||
rcWindow.bottom -= 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)
|
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);
|
||||||
ClientToScreen(hMainWindow, (LPPOINT) &rcWindow + 1);
|
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 marginx = (rcWindow.right - rcWindow.left - BlitArea.right + BlitArea.left)/2;
|
||||||
int marginy = (rcWindow.bottom - rcWindow.top - BlitArea.bottom + BlitArea.top)/2;
|
int marginy = (rcWindow.bottom - rcWindow.top - BlitArea.bottom + BlitArea.top)/2;
|
||||||
@@ -2012,6 +2022,16 @@ void initwinvideo(void)
|
|||||||
rcWindow.bottom -= 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
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user