1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-13 16:44:50 +02:00

3DS system language detection, fix trash in video textures

This commit is contained in:
XProger
2021-02-15 10:17:40 +03:00
parent 9c70e5ba0f
commit aef5d32a4c
4 changed files with 32 additions and 1 deletions

View File

@@ -511,6 +511,11 @@ namespace GAPI {
ret = C3D_TexInitWithParams(&tex, &texCube, params);
}
if (width != origWidth || height != origHeight) {
uint32 texSize = C3D_TexCalcTotalSize(tex.size, tex.maxLevel);
memset(tex.data, 0, texSize);
}
ASSERT(ret);
mmLogVRAM();

View File

@@ -1 +0,0 @@
C:\devkitPro\tools\bin\3dslink.exe OpenLara.3dsx -a 192.168.1.63

View File

@@ -0,0 +1,2 @@
make
/C/devkitPro/tools/bin/3dslink.exe OpenLara.3dsx -a 192.168.1.68

View File

@@ -175,7 +175,30 @@ void sndFree() {
linearFree((uint32*)sndBuffer);
}
int checkLanguage()
{
uint8 id;
CFGU_GetSystemLanguage(&id);
int str = STR_LANG_EN;
switch (id)
{
case CFG_LANGUAGE_EN : str = STR_LANG_EN; break;
case CFG_LANGUAGE_FR : str = STR_LANG_FR; break;
case CFG_LANGUAGE_DE : str = STR_LANG_DE; break;
case CFG_LANGUAGE_ES : str = STR_LANG_ES; break;
case CFG_LANGUAGE_IT : str = STR_LANG_IT; break;
case CFG_LANGUAGE_PT : str = STR_LANG_PT; break;
case CFG_LANGUAGE_RU : str = STR_LANG_RU; break;
case CFG_LANGUAGE_JP : str = STR_LANG_JA; break;
case CFG_LANGUAGE_ZH : str = STR_LANG_CN; break;
}
return str - STR_LANG_EN;
}
int main() {
cfguInit();
setBottomScreen(false);
{
@@ -191,6 +214,8 @@ int main() {
strcpy(contentDir, "sdmc:/3ds/OpenLara/");
Stream::init();
Core::defLang = checkLanguage();
sndInit();
inputInit();