mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-25 15:29:37 -05:00
Use automatic file naming for screen capture .png files.
This commit is contained in:
parent
f49d04fe7a
commit
1c544a663b
@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include "core_control.hpp"
|
#include "core_control.hpp"
|
||||||
|
|
||||||
|
#include "file.hpp"
|
||||||
#include "png_writer.hpp"
|
#include "png_writer.hpp"
|
||||||
|
|
||||||
namespace ui {
|
namespace ui {
|
||||||
@ -80,7 +81,12 @@ void SystemStatusView::set_title(const std::string new_value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SystemStatusView::on_camera() {
|
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++) {
|
for(int i=0; i<320; i++) {
|
||||||
std::array<ColorRGB888, 240> row;
|
std::array<ColorRGB888, 240> row;
|
||||||
|
Loading…
Reference in New Issue
Block a user