diff options
Diffstat (limited to 'src/osd/sdl/sdlmain.c')
-rw-r--r-- | src/osd/sdl/sdlmain.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/osd/sdl/sdlmain.c b/src/osd/sdl/sdlmain.c index ac4729166e2..00fc9adcbf8 100644 --- a/src/osd/sdl/sdlmain.c +++ b/src/osd/sdl/sdlmain.c @@ -633,44 +633,3 @@ void sdl_osd_interface::init(running_machine &machine) SDL_EnableUNICODE(SDL_TRUE); #endif } - -#ifdef SDLMAME_WIN32 - -//============================================================ -// wstring_from_utf8 -//============================================================ - -WCHAR *wstring_from_utf8(const char *utf8string) -{ - int char_count; - WCHAR *result; - - // convert MAME string (UTF-8) to UTF-16 - char_count = MultiByteToWideChar(CP_UTF8, 0, utf8string, -1, NULL, 0); - result = (WCHAR *)osd_malloc_array(char_count * sizeof(*result)); - if (result != NULL) - MultiByteToWideChar(CP_UTF8, 0, utf8string, -1, result, char_count); - - return result; -} - - -//============================================================ -// utf8_from_wstring -//============================================================ - -char *utf8_from_wstring(const WCHAR *wstring) -{ - int char_count; - char *result; - - // convert UTF-16 to MAME string (UTF-8) - char_count = WideCharToMultiByte(CP_UTF8, 0, wstring, -1, NULL, 0, NULL, NULL); - result = (char *)osd_malloc_array(char_count * sizeof(*result)); - if (result != NULL) - WideCharToMultiByte(CP_UTF8, 0, wstring, -1, result, char_count, NULL, NULL); - - return result; -} - -#endif |