summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Subv2014-12-19 17:01:23 -0500
committerGravatar Subv2014-12-21 16:39:02 -0500
commitb49bdb6ba7700007240c207afb69c75f8fbd0f62 (patch)
tree5bee55a552c22e80a72437db1411ac8928f7e1b2 /src
parentCFG: Refactored how the config file works. (diff)
downloadyuzu-b49bdb6ba7700007240c207afb69c75f8fbd0f62.tar.gz
yuzu-b49bdb6ba7700007240c207afb69c75f8fbd0f62.tar.xz
yuzu-b49bdb6ba7700007240c207afb69c75f8fbd0f62.zip
CFGU: Added block 0x000A0002 to the default savegame file
That's the language id block, we're using LANGUAGE_EN for now. This block allows some games to boot further
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/cfg_u.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/hle/service/cfg_u.cpp b/src/core/hle/service/cfg_u.cpp
index 827399cf9..553045437 100644
--- a/src/core/hle/service/cfg_u.cpp
+++ b/src/core/hle/service/cfg_u.cpp
@@ -21,10 +21,25 @@ enum SystemModel {
21 NEW_NINTENDO_3DS_XL 21 NEW_NINTENDO_3DS_XL
22}; 22};
23 23
24enum SystemLanguage {
25 LANGUAGE_JP,
26 LANGUAGE_EN,
27 LANGUAGE_FR,
28 LANGUAGE_DE,
29 LANGUAGE_IT,
30 LANGUAGE_ES,
31 LANGUAGE_ZH,
32 LANGUAGE_KO,
33 LANGUAGE_NL,
34 LANGUAGE_PT,
35 LANGUAGE_RU
36};
37
24static std::unique_ptr<FileSys::Archive_SystemSaveData> cfg_system_save_data; 38static std::unique_ptr<FileSys::Archive_SystemSaveData> cfg_system_save_data;
25static const u64 CFG_SAVE_ID = 0x00010017; 39static const u64 CFG_SAVE_ID = 0x00010017;
26static const u64 CONSOLE_UNIQUE_ID = 0xDEADC0DE; 40static const u64 CONSOLE_UNIQUE_ID = 0xDEADC0DE;
27static const u32 CONSOLE_MODEL = NINTENDO_3DS_XL; 41static const u32 CONSOLE_MODEL = NINTENDO_3DS_XL;
42static const u8 CONSOLE_LANGUAGE = LANGUAGE_EN;
28static const u32 CONFIG_SAVEFILE_SIZE = 0x8000; 43static const u32 CONFIG_SAVEFILE_SIZE = 0x8000;
29static std::array<u8, CONFIG_SAVEFILE_SIZE> cfg_config_file_buffer = { }; 44static std::array<u8, CONFIG_SAVEFILE_SIZE> cfg_config_file_buffer = { };
30 45
@@ -270,6 +285,9 @@ ResultCode FormatConfig() {
270 res = CreateConfigInfoBlk(0x000F0004, 0x4, 0x8, reinterpret_cast<u8 const*>(&CONSOLE_MODEL)); 285 res = CreateConfigInfoBlk(0x000F0004, 0x4, 0x8, reinterpret_cast<u8 const*>(&CONSOLE_MODEL));
271 if (!res.IsSuccess()) 286 if (!res.IsSuccess())
272 return res; 287 return res;
288 res = CreateConfigInfoBlk(0x000A0002, 0x1, 0xA, &CONSOLE_LANGUAGE);
289 if (!res.IsSuccess())
290 return res;
273 // Save the buffer to the file 291 // Save the buffer to the file
274 res = UpdateConfigNANDSavegame(); 292 res = UpdateConfigNANDSavegame();
275 if (!res.IsSuccess()) 293 if (!res.IsSuccess())