Previous 199869 Revisions Next

r45081 Sunday 21st February, 2016 at 08:19:57 UTC by Miodrag Milanović
Fixed language selection and marked it for saving (nw)
[src/emu/ui]custui.cpp

trunk/src/emu/ui/custui.cpp
r253592r253593
2828   file_enumerator path(machine.options().language_path());
2929   const char *lang = machine.options().language();
3030   const osd_directory_entry *dirent;
31   int cnt = 0;
3132   for (int x = 0; (dirent = path.next()) != nullptr; ++x)
3233      if (dirent->type == ENTTYPE_DIR && strcmp(dirent->name, ".") != 0 && strcmp(dirent->name, "..") != 0)
3334      {
3435         m_lang.push_back(dirent->name);
3536         if (strcmp(dirent->name, lang) == 0)
36            m_currlang = x;
37            m_currlang = cnt;
38         ++cnt;
3739      }
3840}
3941
r253592r253593
4850   if (!m_lang.empty())
4951   {
5052      machine().options().set_value(OPTION_LANGUAGE, m_lang[m_currlang].c_str(), OPTION_PRIORITY_CMDLINE, error_string);
53      machine().options().mark_changed(OPTION_LANGUAGE);
5154      load_translation(machine().options());
5255   }
5356   ui_globals::reset = true;


Previous 199869 Revisions Next


© 1997-2024 The MAME Team