mirror of
https://github.com/luanti-org/luanti.git
synced 2025-12-24 23:45:20 +01:00
Allow taking screenshots in main menu (#16749)
Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: siliconsniffer <siliconsniffer@users.noreply.github.com>
This commit is contained in:
20
src/util/screenshot.h
Normal file
20
src/util/screenshot.h
Normal file
@@ -0,0 +1,20 @@
|
||||
// Luanti
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
// Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace video {
|
||||
class IVideoDriver;
|
||||
}
|
||||
|
||||
/**
|
||||
* Take a screenshot and save it to disk
|
||||
* @param driver Video driver to use for the screenshot
|
||||
* @param filename_out Output parameter that receives the path to the saved screenshot
|
||||
* @return true if the screenshot was saved successfully, false otherwise
|
||||
*/
|
||||
bool takeScreenshot(video::IVideoDriver *driver, std::string &filename_out);
|
||||
|
||||
Reference in New Issue
Block a user