| 243 | } |
| 244 | |
| 245 | std::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 | |
| 265 | void Output::ToggleLog() { |
| 266 | static bool show_log = true; |