diff --git a/source/filelist.h b/source/filelist.h index 2153bd5..d8eaff9 100644 --- a/source/filelist.h +++ b/source/filelist.h @@ -37,6 +37,8 @@ extern const u8 zh_lang[]; extern const u32 zh_lang_size; extern const u8 ko_lang[]; extern const u32 ko_lang_size; +extern const u8 pt_lang[]; +extern const u32 pt_lang_size; // Sounds diff --git a/source/menu.cpp b/source/menu.cpp index 21f52d4..d9632a4 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -3325,8 +3325,10 @@ static int MenuSettingsMenu() GCSettings.language++; if(GCSettings.language == LANG_ITALIAN) - GCSettings.language++; - else if(GCSettings.language > LANG_DUTCH) + GCSettings.language = LANG_DUTCH; + else if(GCSettings.language == LANG_SIMP_CHINESE) + GCSettings.language = LANG_PORTUGUESE; + else if(GCSettings.language == LANG_JAPANESE) GCSettings.language = LANG_ENGLISH; break; } @@ -3390,6 +3392,7 @@ static int MenuSettingsMenu() case LANG_SIMP_CHINESE: sprintf(options.value[5], "Chinese (Simplified)"); break; case LANG_TRAD_CHINESE: sprintf(options.value[5], "Chinese (Traditional)"); break; case LANG_KOREAN: sprintf(options.value[5], "Korean"); break; + case LANG_PORTUGUESE: sprintf(options.value[5], "Portuguese"); break; } optionBrowser.TriggerUpdate(); diff --git a/source/preferences.cpp b/source/preferences.cpp index ee7c196..e8b3359 100644 --- a/source/preferences.cpp +++ b/source/preferences.cpp @@ -576,7 +576,7 @@ void FixInvalidSettings() GCSettings.MusicVolume = 40; if(!(GCSettings.SFXVolume >= 0 && GCSettings.SFXVolume <= 100)) GCSettings.SFXVolume = 40; - if(GCSettings.language < 0 || GCSettings.language > LANG_KOREAN) + if(GCSettings.language < 0 || GCSettings.language > LANG_PORTUGUESE) GCSettings.language = LANG_ENGLISH; if(!(GCSettings.render >= 0 && GCSettings.render < 3)) GCSettings.render = 1; diff --git a/source/utils/gettext.cpp b/source/utils/gettext.cpp index 7dc3bce..1a172ba 100644 --- a/source/utils/gettext.cpp +++ b/source/utils/gettext.cpp @@ -221,6 +221,7 @@ bool LoadLanguage() case LANG_SIMP_CHINESE: case LANG_TRAD_CHINESE: file = (char *)zh_lang; eof = file + zh_lang_size; break; case LANG_KOREAN: file = (char *)ko_lang; eof = file + ko_lang_size; break; + case LANG_PORTUGUESE: file = (char *)pt_lang; eof = file + pt_lang_size; break; default: return false; } diff --git a/source/vbagx.h b/source/vbagx.h index 65aa7e2..d945d20 100644 --- a/source/vbagx.h +++ b/source/vbagx.h @@ -53,7 +53,8 @@ enum { LANG_DUTCH, LANG_SIMP_CHINESE, LANG_TRAD_CHINESE, - LANG_KOREAN + LANG_KOREAN, + LANG_PORTUGUESE }; struct SGCSettings{