diff options
Diffstat (limited to 'backends/platform/sdl/win32/codepage.h')
-rw-r--r-- | backends/platform/sdl/win32/codepage.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/backends/platform/sdl/win32/codepage.h b/backends/platform/sdl/win32/codepage.h index db1f7dd78b..b6454005e6 100644 --- a/backends/platform/sdl/win32/codepage.h +++ b/backends/platform/sdl/win32/codepage.h @@ -192,7 +192,14 @@ const CodePageDescription g_cpDescriptions[] = { {nullptr, 0} //End }; -int getCodePageId(Common::String name); +int getCodePageId(Common::String codePageName) { + const CodePageDescription *cp = g_cpDescriptions; + for (; cp->name; cp++) { + if (codePageName.equalsIgnoreCase(cp->name)) + return cp->id; + } + return -1; +} } #endif // WIN32_CODEPAGE_H |