GSdx: Fixed crash when minimizing GS window and alt-tabbing out of fullscreen.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1462 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-07-04 11:43:05 +00:00
parent 43e41bf160
commit 2a5a32d359
1 changed files with 4 additions and 0 deletions

View File

@ -74,6 +74,10 @@ void GSDevice::Present(const GSVector4i& r, int shader)
{ {
GSVector4i cr = m_wnd->GetClientRect(); GSVector4i cr = m_wnd->GetClientRect();
// Skip Presentation if the surface is invisible (minimized or hidden); prevents DX null swapchain crashes.
if(cr.width() == 0 || cr.height() == 0)
return;
if(m_backbuffer->GetWidth() != cr.width() || m_backbuffer->GetHeight() != cr.height()) if(m_backbuffer->GetWidth() != cr.width() || m_backbuffer->GetHeight() != cr.height())
{ {
Reset(cr.width(), cr.height(), false); Reset(cr.width(), cr.height(), false);