Used date timestamp for screenshot name

This commit is contained in:
2025-05-30 11:49:55 -04:00
parent 736f27a6b8
commit 557096abef

View File

@@ -680,7 +680,13 @@ void FractalInspectorApp::TakeScreenshot() {
}
uint8_t* frameBuffer = reinterpret_cast<uint8_t*>(pdatac3.data());
std::ofstream file("screenshot.bmp", std::ios::out | std::ios::binary);
time_t t = std::time(nullptr);
tm tm = *std::localtime(&t);
std::ostringstream filename;
filename << std::put_time(&tm, "%Y-%m-%d %H-%M-%S") << ".bmp";
std::ofstream file(filename.str(), std::ios::out | std::ios::binary);
Vector2i wh = this->canvas->GetDimensions();