utility.cpp 334 B

12345678
  1. #include <nall/encode/png.hpp>
  2. auto Emulator::captureScreenshot(const uint32_t* data, uint pitch, uint width, uint height) -> void {
  3. string filename{Path::desktop(), "higan ", chrono::local::datetime().transform(":", "-"), ".png"};
  4. Encode::PNG::RGB8(filename, data, pitch, width, height);
  5. showMessage("Captured screenshot");
  6. }