| 198 | } |
| 199 | |
| 200 | bool Output::TakeScreenshot(bool is_auto_screenshot) { |
| 201 | #ifdef EMSCRIPTEN |
| 202 | Emscripten_Interface::TakeScreenshot(is_auto_screenshot); |
| 203 | return true; |
| 204 | #else |
| 205 | auto fs = FileFinder::Save(); |
| 206 | auto p = GetNextScreenshotFileName(fs, is_auto_screenshot); |
| 207 | return TakeScreenshot(p); |
| 208 | #endif |
| 209 | } |
| 210 | |
| 211 | bool Output::TakeScreenshot(std::string_view file) { |
| 212 | auto ret = FileFinder::Save().OpenOutputStream(file, std::ios_base::binary | std::ios_base::out | std::ios_base::trunc); |
nothing calls this directly
no test coverage detected