DXPOLY_Flip

This commit is contained in:
krystalgamer 2024-09-10 17:48:42 +02:00
parent e4a79832cc
commit a482759d37
3 changed files with 16 additions and 2 deletions

View File

@ -33,7 +33,7 @@ EXPORT LPDIRECTDRAW7 lpDD;
EXPORT DWORD gTotalVideoMemory;
LPDIRECTDRAWSURFACE7 g_pDDS_SaveScreen;
EXPORT LPDIRECTDRAWSURFACE7 g_pDDS_Scene;
LPDIRECTDRAWSURFACE7 g_pDDS_Scene;
EXPORT LPDIRECTDRAWCLIPPER g_pClipper;

View File

@ -123,6 +123,7 @@ EXPORT extern LPDIRECT3DDEVICE7 g_D3DDevice7;
EXPORT extern i32 gDxOptionRelated;
EXPORT extern LPDIRECTDRAWSURFACE7 g_pDDS_SaveScreen;
EXPORT extern RECT gRect;
EXPORT extern LPDIRECTDRAWSURFACE7 g_pDDS_Scene;
void validate_DXContext(void);
void validate_DXContextEntry(void);

View File

@ -588,7 +588,20 @@ void DXPOLY_EndScene(bool)
// @SMALLTODO
void DXPOLY_Flip(void)
{
printf("DXPOLY_Flip(void)");
if (gDxOptionRelated)
{
DDBLTFX v4;
memset(&v4, 0, sizeof(v4));
v4.dwSize = sizeof(v4);
HRESULT hr = g_pDDS_SaveScreen->Blt(&gRect, g_pDDS_Scene, 0, 0x1000000, &v4);
D3D_ERROR_LOG_AND_QUIT(hr);
}
else
{
HRESULT hr = g_pDDS_SaveScreen->Flip(0, 1);
D3D_ERROR_LOG_AND_QUIT(hr);
}
}
// @SMALLTODO