MCPcopy Create free account
hub / github.com/EasyRPG/Player / GetNextScreenshotFileName

Method GetNextScreenshotFileName

src/output.cpp:245–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243}
244
245std::string Output::GetNextScreenshotFileName(FilesystemView fs, bool is_auto_screenshot) {
246 std::string output_path;
247 int index = 0;
248 std::string name = GetScreenshotName(is_auto_screenshot);
249
250 if (Player::player_config.screenshot_timestamp.Get()) {
251 output_path = name + ".png";
252 if (!fs.Exists(output_path)) {
253 return output_path;
254 }
255 index++;
256 }
257 name += "_";
258
259 do {
260 output_path = name + std::to_string(index++) + ".png";
261 } while (fs.Exists(output_path));
262 return output_path;
263}
264
265void Output::ToggleLog() {
266 static bool show_log = true;

Callers

nothing calls this directly

Calls 2

GetMethod · 0.45
ExistsMethod · 0.45

Tested by

no test coverage detected