mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-12 11:42:13 -04:00
File: Make path a first-class object, add some methods from C++17.
This commit is contained in:
parent
f80706cb34
commit
b87d1456a2
4 changed files with 166 additions and 39 deletions
|
@ -81,13 +81,13 @@ void SystemStatusView::set_title(const std::string new_value) {
|
|||
}
|
||||
|
||||
void SystemStatusView::on_camera() {
|
||||
const auto filename_stem = next_filename_stem_matching_pattern(u"SCR_????");
|
||||
if( filename_stem.empty() ) {
|
||||
auto path = next_filename_stem_matching_pattern(u"SCR_????");
|
||||
if( path.empty() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
PNGWriter png;
|
||||
auto create_error = png.create(filename_stem + u".PNG");
|
||||
auto create_error = png.create(path.replace_extension(u".PNG"));
|
||||
if( create_error.is_valid() ) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue