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,6 +929,7 @@ void CGraphics_SDL::Swap()
{ {
if(m_DoScreenshot) if(m_DoScreenshot)
{ {
if(WindowActive())
ScreenshotDirect(m_aScreenshotName); ScreenshotDirect(m_aScreenshotName);
m_DoScreenshot = false; m_DoScreenshot = false;
} }

View file

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