mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
Changed both video plugins to save PNG screenshots. Made GCPad New default in trunk (it already is in stable). Fixed a hack in new wiimote plugin. Other minor changes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5532 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -1133,7 +1133,19 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
||||
if(s_bScreenshot)
|
||||
{
|
||||
s_criticalScreenshot.Enter();
|
||||
D3DXSaveSurfaceToFileA(s_sScreenshotName, D3DXIFF_BMP, D3D::GetBackBufferSurface(), NULL, NULL);
|
||||
|
||||
// create a R8G8B8 surface for the screenshot (no alpha channel)
|
||||
// otherwise funky screenshots get saved
|
||||
LPDIRECT3DSURFACE9 screenshot_surface;
|
||||
if (D3D_OK == D3D::dev->CreateOffscreenPlainSurface(s_backbuffer_width, s_backbuffer_height, D3DFMT_R8G8B8, D3DPOOL_SCRATCH, &screenshot_surface, NULL))
|
||||
{
|
||||
D3DXLoadSurfaceFromSurface(screenshot_surface, NULL, NULL, D3D::GetBackBufferSurface(), NULL, NULL, D3DX_DEFAULT, 0);
|
||||
D3DXSaveSurfaceToFileA(s_sScreenshotName, D3DXIFF_PNG, screenshot_surface, NULL, NULL);
|
||||
screenshot_surface->Release();
|
||||
}
|
||||
else
|
||||
PanicAlert("Failed to create surface for screenshot!");
|
||||
|
||||
s_bScreenshot = false;
|
||||
s_criticalScreenshot.Leave();
|
||||
}
|
||||
|
Reference in New Issue
Block a user