Player Frame capture F10

New feature of Player: capture frame (F10 shortcut). Extending the Screenshot class for reading pixels and saving to PNG. Cleaup of screenshot (now associated to F9).
This commit is contained in:
Bruno Herbelin
2022-06-22 01:40:47 +02:00
parent f2405e02f6
commit 7858033628
8 changed files with 182 additions and 85 deletions

View File

@@ -170,6 +170,7 @@ void Settings::Save(uint64_t runtime)
SourceConfNode->SetAttribute("new_type", application.source.new_type);
SourceConfNode->SetAttribute("ratio", application.source.ratio);
SourceConfNode->SetAttribute("res", application.source.res);
SourceConfNode->SetAttribute("capture_path", application.source.capture_path.c_str());
pRoot->InsertEndChild(SourceConfNode);
// Brush
@@ -411,6 +412,12 @@ void Settings::Load()
sourceconfnode->QueryIntAttribute("new_type", &application.source.new_type);
sourceconfnode->QueryIntAttribute("ratio", &application.source.ratio);
sourceconfnode->QueryIntAttribute("res", &application.source.res);
const char *path_ = recordnode->Attribute("capture_path");
if (path_)
application.source.capture_path = std::string(path_);
else
application.source.capture_path = SystemToolkit::home_path();
}
// Transition