mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-12 11:42:13 -04:00
Use automatic file naming for screen capture .png files.
This commit is contained in:
parent
f49d04fe7a
commit
1c544a663b
1 changed files with 7 additions and 1 deletions
|
@ -35,6 +35,7 @@
|
|||
|
||||
#include "core_control.hpp"
|
||||
|
||||
#include "file.hpp"
|
||||
#include "png_writer.hpp"
|
||||
|
||||
namespace ui {
|
||||
|
@ -80,7 +81,12 @@ void SystemStatusView::set_title(const std::string new_value) {
|
|||
}
|
||||
|
||||
void SystemStatusView::on_camera() {
|
||||
PNGWriter png { "capture.png" };
|
||||
const auto filename = next_filename_matching_pattern("SCR_????.PNG");
|
||||
if( filename.empty() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
PNGWriter png { filename };
|
||||
|
||||
for(int i=0; i<320; i++) {
|
||||
std::array<ColorRGB888, 240> row;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue