Reload font on language change (#5279)

This commit is contained in:
inspectredc 2025-04-02 17:38:12 +01:00 committed by GitHub
parent c5e0e32391
commit ccb7839eda
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1806,6 +1806,18 @@ void FileChoose_PulsateCursor(GameState* thisx) {
void FileChoose_ConfigModeUpdate(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
// #region SOH [NTSC] Reload Fonts If Language Has Changed
static s32 previousLanguage = LANGUAGE_ENG;
if (previousLanguage != gSaveContext.language) {
if (ResourceMgr_GetGameRegion(0) == GAME_REGION_PAL && gSaveContext.language != LANGUAGE_JPN) {
Font_LoadOrderedFont(&this->font);
} else { // GAME_REGION_NTSC
Font_LoadOrderedFontNTSC(&this->font);
}
previousLanguage = gSaveContext.language;
}
// #endregion
if (ResourceMgr_GetGameRegion(0) == GAME_REGION_PAL && gSaveContext.language != LANGUAGE_JPN) {
gConfigModeUpdateFuncs[this->configMode](&this->state);
} else { // GAME_REGION_NTSC