wince fixes

This commit is contained in:
p.kosyh 2011-01-18 07:43:50 +00:00
parent d7e7c1b21c
commit e336e5c39a

View file

@ -35,7 +35,7 @@ char *game_locale(void)
} }
static char *game_codepage = NULL; static char *game_codepage = NULL;
#if 0
#ifdef _HAVE_ICONV #ifdef _HAVE_ICONV
static char *game_cp(void) static char *game_cp(void)
{ {
@ -53,15 +53,8 @@ char *mbs2utf8(const char *s)
{ {
iconv_t han; iconv_t han;
char *str; char *str;
if (!game_codepage) { if (!game_codepage)
game_codepage = game_cp(); game_codepage = game_cp();
if (game_codepage)
fprintf(stderr, "Game codepage: %s\n", game_codepage);
else {
fprintf(stderr, "Falling to windows-1251\n");
game_codepage = strdup("WINDOWS-1251");
}
}
if (!s) if (!s)
return NULL; return NULL;
if (!game_codepage) if (!game_codepage)
@ -84,16 +77,22 @@ char *mbs2utf8(const char *s)
return strdup(s); return strdup(s);
} }
#endif #endif
#endif
extern void unix_path(char *); extern void unix_path(char *);
char *sdl_path(char *p) char *sdl_path(char *p)
{ {
#if 0
char *r = mbs2utf8(p); char *r = mbs2utf8(p);
if (p) if (p)
free(p); free(p);
unix_path(r); unix_path(r);
return r; return r;
#else
unix_path(p);
return p;
#endif
} }
char *app_dir( void ); char *app_dir( void );