EXPERIMENTAL:

rewrite frame dumping and screen shots to make them more stable and correct
enable viewport resizing for all cards, the emulation is more correct in this way
test this a lot please.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4971 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado
2010-01-27 22:07:59 +00:00
parent a241a469b8
commit e856d0b3ed
2 changed files with 94 additions and 93 deletions

View File

@ -392,32 +392,7 @@ void Video_AddMessage(const char* pstr, u32 milliseconds)
HRESULT ScreenShot(const char *File)
{
if (D3D::dev == NULL)
return S_FALSE;
D3DDISPLAYMODE DisplayMode;
if (FAILED(D3D::dev->GetDisplayMode(0, &DisplayMode)))
return S_FALSE;
LPDIRECT3DSURFACE9 surf;
if (FAILED(D3D::dev->CreateOffscreenPlainSurface(DisplayMode.Width, DisplayMode.Height, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &surf, NULL)))
return S_FALSE;
if (FAILED(D3D::dev->GetFrontBufferData(0, surf)))
{
surf->Release();
return S_FALSE;
}
RECT rect;
::GetWindowRect(EmuWindow::GetWnd(), &rect);
if (FAILED(D3DXSaveSurfaceToFileA(File, D3DXIFF_PNG, surf, NULL, &rect)))
{
surf->Release();
return S_FALSE;
}
surf->Release();
Renderer::SetScreenshot(File);
return S_OK;
}