summaryrefslogtreecommitdiff
path: root/screenshot.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-03-25 09:22:10 +0000
committerDarkvater <darkvater@openttd.org>2006-03-25 09:22:10 +0000
commit9b5d8a9921d0f8a0ed5b9dd0f3d796a35c342f8c (patch)
tree86d8ae1e4f41e2d9e2ecfe600c9e0bcd66d31b18 /screenshot.c
parent6cafd5f0e33f44818cc128ad3b1a140a3215e853 (diff)
downloadopenttd-9b5d8a9921d0f8a0ed5b9dd0f3d796a35c342f8c.tar.xz
(svn r4105) - Feature: Add proper ISO-8859-15 <> LOCALCODE conversion. As the mess that is makefile can't properly support it at the moment, it is only available for MACOSX. Windows doesn't need FS conversion and I have no idea about OS/2 so it's disabled for them.
- CodeChange: Change the function GetCurrentLocale(). It returns the locale from some default environment-variables, plus a custom one defined as parameter. If all fail, it tries $LANG.
Diffstat (limited to 'screenshot.c')
-rw-r--r--screenshot.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/screenshot.c b/screenshot.c
index 963c5cff3..b384a591e 100644
--- a/screenshot.c
+++ b/screenshot.c
@@ -7,17 +7,12 @@
#include "strings.h"
#include "table/strings.h"
#include "gfx.h"
+#include "hal.h"
#include "viewport.h"
#include "player.h"
#include "screenshot.h"
#include "variables.h"
-#if defined(__APPLE__) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3)
-extern const char *convert_to_fs_charset(const char *filename);
-#else
-#define convert_to_fs_charset(str) (str)
-#endif
-
char _screenshot_format_name[8];
uint _num_screenshot_formats;
uint _cur_screenshot_format;
@@ -79,7 +74,7 @@ static bool MakeBmpImage(const char *name, ScreenshotCallback *callb, void *user
if (pixelformat != 8)
return false;
- f = fopen(convert_to_fs_charset(name), "wb");
+ f = fopen(OTTD2FS(name), "wb");
if (f == NULL) return false;
// each scanline must be aligned on a 32bit boundary
@@ -183,7 +178,7 @@ static bool MakePNGImage(const char *name, ScreenshotCallback *callb, void *user
if (pixelformat != 8)
return false;
- f = fopen(convert_to_fs_charset(name), "wb");
+ f = fopen(OTTD2FS(name), "wb");
if (f == NULL) return false;
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, (char *)name, png_my_error, png_my_warning);
@@ -294,7 +289,7 @@ static bool MakePCXImage(const char *name, ScreenshotCallback *callb, void *user
if (pixelformat != 8 || w == 0)
return false;
- f = fopen(convert_to_fs_charset(name), "wb");
+ f = fopen(OTTD2FS(name), "wb");
if (f == NULL) return false;
memset(&pcx, 0, sizeof(pcx));