skip screenshot when window isn't active. Closes #931

This commit is contained in:
oy 2012-03-04 12:46:46 +01:00
parent 8c033a0e2e
commit 525e7ad7d4
2 changed files with 4 additions and 2 deletions

View file

@ -929,7 +929,8 @@ void CGraphics_SDL::Swap()
{
if(m_DoScreenshot)
{
ScreenshotDirect(m_aScreenshotName);
if(WindowActive())
ScreenshotDirect(m_aScreenshotName);
m_DoScreenshot = false;
}

View file

@ -843,7 +843,8 @@ void CGraphics_Threaded::Swap()
// TODO: screenshot support
if(m_DoScreenshot)
{
ScreenshotDirect(m_aScreenshotName);
if(WindowActive())
ScreenshotDirect(m_aScreenshotName);
m_DoScreenshot = false;
}