PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Taking screenshot

Kzinti this question is mainly to you:

Code:

//adding to Rasterizer.cpp
const Surface * Rasterizer::GetScreenshot()
{
return m_surface;
}

//in the GameLoop()

Display* display = GetDisplay();

//draw everything here

if(bGetScreenshot)
{
SaveImage(display->GetScreenshot() , pathname);
bGetScreenshot = false;
}
display->Update();



I just need a fast way of taking screenshot on VGA devices

Is it always a safe way, assuming I'm doing GetScreenshot() after GetDisplay() but before the Update()?

Thanks.
Yes, this should work well.