minor changes

This commit is contained in:
A-lex-Ra 2024-02-23 19:42:50 +06:00
parent a0b6ddccf8
commit 659a2610aa

View File

@ -100,14 +100,14 @@ void Engine::updateTimers() {
} }
void Engine::updateHotkeys() { void Engine::updateHotkeys() {
if (Events::jpressed(static_cast<int>(keycode::F2))) { if (Events::jpressed(keycode::F2)) {
std::unique_ptr<ImageData> image(Window::takeScreenshot()); std::unique_ptr<ImageData> image(Window::takeScreenshot());
image->flipY(); image->flipY();
fs::path filename = paths->getScreenshotFile("png"); fs::path filename = paths->getScreenshotFile("png");
png::write_image(filename.string(), image.get()); png::write_image(filename.string(), image.get());
std::cout << "saved screenshot as " << filename << std::endl; std::cout << "saved screenshot as " << filename << std::endl;
} }
if (Events::jpressed(static_cast<int>(keycode::F11))) { if (Events::jpressed(keycode::F11)) {
Window::toggleFullscreen(); Window::toggleFullscreen();
} }
} }