]> git.jsancho.org Git - lugaru.git/blobdiff - Source/ImageIO.cpp
Switched all data access to the new methods
[lugaru.git] / Source / ImageIO.cpp
index 3e9f15501eb70a65898476d1be80705c83f16a85..3e6a72e825fc2caf89411e692e27a6b02618f9c8 100644 (file)
@@ -27,6 +27,7 @@ along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
 
 #include "Game.h"
 #include "ImageIO.h"
+#include "Utils/Folders.h"
 
 extern bool visibleloading;
 
@@ -74,7 +75,7 @@ bool save_screenshot(const char *file_name)
     const char *ptr = strrchr((char *)file_name, '.');
     if (ptr) {
         if (strcasecmp(ptr + 1, "png") == 0)
-            return save_screenshot_png(file_name);
+            return save_screenshot_png((Folders::getScreenshotDir() + '/' + file_name).c_str());
     }
 
     STUBBED("Unsupported image type");
@@ -291,6 +292,6 @@ save_png_done:
     if (fp)
         fclose(fp);
     if (!retval)
-        unlink(ConvertFileName(file_name));
+        unlink(file_name);
     return retval;
 }