From 5b9baa97e65314454005edb1231e18cf0f5bfb43 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 9 Jul 2011 14:12:51 +0000 Subject: Report screenshot filenames on-screen. --- src/render/jpgfile.cc | 9 +++++++-- src/render/pngfile.cc | 9 +++++++-- src/render/tgafile.cc | 9 +++++++-- 3 files changed, 21 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/render/jpgfile.cc b/src/render/jpgfile.cc index 890c543..25093b0 100644 --- a/src/render/jpgfile.cc +++ b/src/render/jpgfile.cc @@ -14,9 +14,10 @@ http://www.zarb.org/~gc/html/libpng.html #include #include +#include "sys/sys.h" #include "filesystem/filesystem.h" #include "render/jpgfile.h" -#include "sys/sys.h" +#include "core/application.h" // work-around for a jpeglib problem, needed on win32 and osx #ifdef HAVE_STDLIB_H @@ -114,7 +115,11 @@ void JPG::save(const char *filename, Image & image, int jpeg_quality) jpeg_destroy_compress(&jpeg_compression_info); - con_print << "Wrote " << filename << std::endl; + //con_print << "Wrote " << filename << std::endl; + std::string message; + message.assign("Wrote "); + message.append(filename); + core::application()->notify_message(core::Message::Info, message); } } diff --git a/src/render/pngfile.cc b/src/render/pngfile.cc index ca8c8d5..da786ec 100644 --- a/src/render/pngfile.cc +++ b/src/render/pngfile.cc @@ -17,9 +17,10 @@ http://www.zarb.org/~gc/html/libpng.html #include +#include "sys/sys.h" #include "filesystem/filesystem.h" #include "render/pngfile.h" -#include "sys/sys.h" +#include "core/application.h" namespace render { @@ -193,7 +194,11 @@ void PNG::save(const char *filename, Image & image) fclose(png_file); png_destroy_write_struct(&png_ptr, &info_ptr); - con_print << "Wrote " << filename << std::endl; + //con_print << "Wrote " << filename << std::endl; + std::string message; + message.assign("Wrote "); + message.append(filename); + core::application()->notify_message(core::Message::Info, message); } } diff --git a/src/render/tgafile.cc b/src/render/tgafile.cc index 0f5833e..efb86e9 100644 --- a/src/render/tgafile.cc +++ b/src/render/tgafile.cc @@ -31,9 +31,10 @@ #include #include +#include "sys/sys.h" #include "filesystem/filesystem.h" #include "render/tgafile.h" -#include "sys/sys.h" +#include "core/application.h" const unsigned char TGA_NONE = 0; const unsigned char TGA_TRUECOLOR = 2; @@ -361,7 +362,11 @@ void TGA::save(const char *filename, Image & image) // close file ofs.close(); - con_print << "Wrote " << filename << std::endl; + //con_print << "Wrote " << filename << std::endl; + std::string message; + message.assign("Wrote "); + message.append(filename); + core::application()->notify_message(core::Message::Info, message); } } -- cgit v1.2.3