| 167 | } |
| 168 | |
| 169 | void Scene_Language::ChangeLanguage(const std::string& lang_str) { |
| 170 | Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Main_Data::game_system->SFX_Decision)); |
| 171 | |
| 172 | // No-op? |
| 173 | if (lang_str == Player::translation.GetCurrentLanguage().lang_dir) { |
| 174 | PopOrTitle(); |
| 175 | return; |
| 176 | } |
| 177 | |
| 178 | // First change the language |
| 179 | Player::translation.SelectLanguage(lang_str); |
| 180 | Main_Data::game_system->ReloadSystemGraphic(); |
| 181 | |
| 182 | // Delay scene shutdown by one frame to allow async requests for language change |
| 183 | // and system graphic reload to finish before the scene switches |
| 184 | shutdown = true; |
| 185 | } |
| 186 | |
| 187 | void Scene_Language::PopOrTitle() { |
| 188 | if (!Find(Title)) { |
nothing calls this directly
no test coverage detected