mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-20 23:01:16 +00:00
improve accuracy
This commit is contained in:
parent
33e349cf5d
commit
41604832cf
@ -875,9 +875,8 @@ BOOL MxDirectDraw::GetDDSurfaceDesc(LPDDSURFACEDESC lpDDSurfDesc, LPDIRECTDRAWSU
|
|||||||
BOOL MxDirectDraw::IsSupportedMode(int width, int height, int bpp)
|
BOOL MxDirectDraw::IsSupportedMode(int width, int height, int bpp)
|
||||||
{
|
{
|
||||||
Mode mode = { width, height, bpp };
|
Mode mode = { width, height, bpp };
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < m_pCurrentDeviceModesList->count; i++)
|
for (int i = 0; i < m_pCurrentDeviceModesList->count; i++)
|
||||||
{
|
{
|
||||||
if (m_pCurrentDeviceModesList->m_mode_ARRAY[i] == mode)
|
if (m_pCurrentDeviceModesList->m_mode_ARRAY[i] == mode)
|
||||||
{
|
{
|
||||||
@ -1154,11 +1153,10 @@ void MxDirectDraw::unk1()
|
|||||||
HRESULT result;
|
HRESULT result;
|
||||||
byte* line;
|
byte* line;
|
||||||
DDSURFACEDESC ddsd;
|
DDSURFACEDESC ddsd;
|
||||||
int i;
|
int j;
|
||||||
unsigned int j;
|
|
||||||
int count = m_bFlipSurfaces ? 2 : 1;
|
int count = m_bFlipSurfaces ? 2 : 1;
|
||||||
|
|
||||||
for (i = 0; count > i; i++)
|
for (int i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
memset(&ddsd, 0, sizeof(ddsd));
|
memset(&ddsd, 0, sizeof(ddsd));
|
||||||
ddsd.dwSize = sizeof(ddsd);
|
ddsd.dwSize = sizeof(ddsd);
|
||||||
@ -1178,10 +1176,10 @@ void MxDirectDraw::unk1()
|
|||||||
|
|
||||||
// clear backBuffer
|
// clear backBuffer
|
||||||
line = (byte*)ddsd.lpSurface;
|
line = (byte*)ddsd.lpSurface;
|
||||||
for (j = ddsd.dwHeight - 1; j ; j--)
|
for (j = ddsd.dwHeight; j-- ;)
|
||||||
{
|
{
|
||||||
memset(line, 0, ddsd.dwWidth);
|
memset(line, 0, ddsd.dwWidth);
|
||||||
line += ddsd.lPitch;
|
line += ddsd.lPitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pBackBuffer->Unlock(ddsd.lpSurface);
|
m_pBackBuffer->Unlock(ddsd.lpSurface);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user