MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / takeScreenshot

Method takeScreenshot

source/utils/ResourceManager.cpp:548–559  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

546}
547
548void ResourceManager::takeScreenshot(Ogre::RenderTarget* renderTarget)
549{
550 static int screenShotCounter = 0;
551
552 static std::locale loc(std::wcout.getloc(), new boost::posix_time::time_facet("%Y-%m-%d_%H%M%S"));
553
554 std::ostringstream ss;
555 ss.imbue(loc);
556 ss << "ODscreenshot_" << boost::posix_time::second_clock::local_time()
557 << "_" << screenShotCounter++ << ".png";
558 renderTarget->writeContentsToFile(getUserDataPath() + ss.str());
559}
560
561std::string ResourceManager::buildReplayFilename()
562{

Callers 2

keyPressedNormalMethod · 0.80
keyPressedMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected