mirror of
https://github.com/holub/mame
synced 2025-04-20 23:42:22 +03:00
don't attempt to load a translation file if the language setting is empty (nw)
This commit is contained in:
parent
1172f9d114
commit
43953ea10a
@ -60,11 +60,14 @@ void load_translation(emu_options &m_options)
|
||||
f_translation_data.reset();
|
||||
f_translation_map.clear();
|
||||
|
||||
emu_file file(m_options.language_path(), OPEN_FLAG_READ);
|
||||
std::string name = m_options.language();
|
||||
if (name.empty())
|
||||
return;
|
||||
|
||||
strreplace(name, " ", "_");
|
||||
strreplace(name, "(", "");
|
||||
strreplace(name, ")", "");
|
||||
emu_file file(m_options.language_path(), OPEN_FLAG_READ);
|
||||
if (file.open(name.c_str(), PATH_SEPARATOR "strings.mo") != osd_file::error::NONE)
|
||||
{
|
||||
osd_printf_error("Error opening translation file %s\n", name);
|
||||
|
Loading…
Reference in New Issue
Block a user