Luanti 5.15.0-dev
 
Loading...
Searching...
No Matches
screenshot.cpp File Reference
#include "screenshot.h"
#include "filesys.h"
#include "gettime.h"
#include "porting.h"
#include "settings.h"
#include "util/string.h"
#include "util/numeric.h"
#include "gettext.h"
#include "log.h"
#include "debug.h"
#include <IVideoDriver.h>
#include <ctime>
+ Include dependency graph for screenshot.cpp:

Macros

#define SCREENSHOT_MAX_SERIAL_TRIES   1000
 

Functions

bool takeScreenshot (video::IVideoDriver *driver, std::string &filename_out)
 Take a screenshot and save it to disk.
 

Macro Definition Documentation

◆ SCREENSHOT_MAX_SERIAL_TRIES

#define SCREENSHOT_MAX_SERIAL_TRIES   1000

Referenced by takeScreenshot().

Function Documentation

◆ takeScreenshot()

bool takeScreenshot ( video::IVideoDriver * driver,
std::string & filename_out )

Take a screenshot and save it to disk.

Parameters
driverVideo driver to use for the screenshot
filename_outOutput parameter that receives the path to the saved screenshot
Returns
true if the screenshot was saved successfully, false otherwise

References fs::CreateAllDirs(), DIR_DELIM, errorstream, fmtgettext(), g_settings, Settings::get(), Settings::getS32(), infostream, fs::IsPathAbsolute(), itos(), mt_localtime(), porting::path_user, fs::PathExists(), rangelim(), sanity_check, and SCREENSHOT_MAX_SERIAL_TRIES.

Referenced by Client::makeScreenshot(), and GUIEngine::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: