mirror of https://github.com/sm64pc/sm64pc.git
eu: check if language value is correct
This commit is contained in:
parent
5705a708d3
commit
89974e786d
|
@ -702,6 +702,9 @@ void eu_set_language(u16 language) {
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 eu_get_language(void) {
|
u16 eu_get_language(void) {
|
||||||
|
// check if the language is in range, in case we loaded a US save with garbage padding or something
|
||||||
|
if (gSaveBuffer.menuData[0].language >= LANGUAGE_MAX)
|
||||||
|
eu_set_language(LANGUAGE_ENGLISH); // reset it to english if not
|
||||||
return gSaveBuffer.menuData[0].language;
|
return gSaveBuffer.menuData[0].language;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -153,7 +153,8 @@ s32 check_warp_checkpoint(struct WarpNode *warpNode);
|
||||||
enum EuLanguages {
|
enum EuLanguages {
|
||||||
LANGUAGE_ENGLISH,
|
LANGUAGE_ENGLISH,
|
||||||
LANGUAGE_FRENCH,
|
LANGUAGE_FRENCH,
|
||||||
LANGUAGE_GERMAN
|
LANGUAGE_GERMAN,
|
||||||
|
LANGUAGE_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
void eu_set_language(u16 language);
|
void eu_set_language(u16 language);
|
||||||
|
|
Loading…
Reference in New Issue