16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 01:59:19 +02:00

change screenshot key, configurable location

This commit is contained in:
milek7
2018-01-29 11:17:13 +01:00
parent fa431fd1fe
commit 07b0ac6a95
4 changed files with 22 additions and 10 deletions

View File

@@ -90,7 +90,7 @@ void screenshot_save_thread( char *img )
perf = ts.tv_nsec;
#endif
std::string filename = "screenshots/" + std::string(datetime) +
std::string filename = Global::screenshot_dir + "/" + std::string(datetime) +
"_" + std::to_string(perf) + ".png";
if (png_image_write_to_file(&png, filename.c_str(), 0, img, -Global::iWindowWidth * 3, nullptr) == 1)
@@ -186,7 +186,7 @@ void key_callback( GLFWwindow *window, int key, int scancode, int action, int mo
switch( key )
{
case GLFW_KEY_F11: {
case GLFW_KEY_PRINT_SCREEN: {
make_screenshot();
break;
}