MCPcopy Create free account
hub / github.com/MyGUI/mygui / makeScreenShot

Method makeScreenShot

Common/Base/Ogre/BaseManager.cpp:141–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139 }
140
141 void BaseManager::makeScreenShot()
142 {
143 std::ifstream stream;
144 std::string file;
145 do
146 {
147 stream.close();
148 static size_t num = 0;
149 const size_t max_shot = 100;
150 if (num == max_shot)
151 {
152 MYGUI_LOG(Info, "The limit of screenshots is exceeded : " << max_shot);
153 return;
154 }
155 file = MyGUI::utility::toString("screenshot_", ++num, ".png");
156 stream.open(file.c_str());
157 } while (stream.is_open());
158 mWindow->writeContentsToFile(file);
159 }
160
161 void BaseManager::setupResources()
162 {

Callers

nothing calls this directly

Calls 4

toStringFunction · 0.85
closeMethod · 0.45
openMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected