Used date timestamp for screenshot name
This commit is contained in:
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user