mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-20 15:40:26 -04:00
Change next-file naming functions to work on filename stems.
This paves the way for writing metadata files with similar prefixes, and avoids confusing numbering of capture files with different extensions (e.g. BAD_0000.S16 and BBD_0000.S8).
This commit is contained in:
parent
dc8c34487f
commit
12b8a1b2a9
7 changed files with 29 additions and 34 deletions
|
@ -81,12 +81,12 @@ void SystemStatusView::set_title(const std::string new_value) {
|
|||
}
|
||||
|
||||
void SystemStatusView::on_camera() {
|
||||
const auto filename = next_filename_matching_pattern("SCR_????.PNG");
|
||||
if( filename.empty() ) {
|
||||
const auto filename_stem = next_filename_stem_matching_pattern("SCR_????");
|
||||
if( filename_stem.empty() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
PNGWriter png { filename };
|
||||
PNGWriter png { filename_stem + ".PNG" };
|
||||
|
||||
for(int i=0; i<320; i++) {
|
||||
std::array<ColorRGB888, 240> row;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue