diff --git a/desktop_version/src/CWrappers.cpp b/desktop_version/src/CWrappers.cpp index 32ee9c6a..9f826196 100644 --- a/desktop_version/src/CWrappers.cpp +++ b/desktop_version/src/CWrappers.cpp @@ -1,8 +1,12 @@ #include +#include "Localization.h" #include "UtilityClass.h" -extern "C" char* HELP_number_words(int _t) +extern "C" +{ + +char* HELP_number_words(int _t) { /* C wrapper for UtilityClass::number_words. * Caller must VVV_free. */ @@ -15,3 +19,10 @@ extern "C" char* HELP_number_words(int _t) return buffer; } + +uint32_t LOC_toupper_ch(uint32_t ch) +{ + return loc::toupper_ch(ch); +} + +} /* extern "C" */ diff --git a/desktop_version/src/CWrappers.h b/desktop_version/src/CWrappers.h index eb03880f..f24e5e25 100644 --- a/desktop_version/src/CWrappers.h +++ b/desktop_version/src/CWrappers.h @@ -2,5 +2,6 @@ #define CWRAPPERS_H char* HELP_number_words(int _t); +uint32_t LOC_toupper_ch(uint32_t ch); #endif /* CWRAPPERS_H */ diff --git a/desktop_version/src/VFormat.c b/desktop_version/src/VFormat.c index ae8eff90..1e116d48 100644 --- a/desktop_version/src/VFormat.c +++ b/desktop_version/src/VFormat.c @@ -74,7 +74,7 @@ static inline void call_with_upper(format_callback callback, void* userdata, con utf8[bytes] = '\0'; PHYSFS_utf8ToUcs4(utf8, utf32, conv_bytes*4); - utf32[0] = SDL_toupper(utf32[0]); /* FIXME: use loc::toupper_ch in localization branch */ + utf32[0] = LOC_toupper_ch(utf32[0]); PHYSFS_utf8FromUcs4(utf32, utf8, conv_bytes); callback(userdata, utf8, SDL_strlen(utf8));