summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2016-02-29 23:42:36 -0800
committerGravatar Yuri Kunde Schlesner2016-02-29 23:55:48 -0800
commit228d8ac14acb2d7c711596a5cd1974a42112cb07 (patch)
treead170a29c92e0eb8173e96db2e0fe85abd24097e
parentMerge pull request #1427 from MerryMage/emit-lbit (diff)
downloadyuzu-228d8ac14acb2d7c711596a5cd1974a42112cb07.tar.gz
yuzu-228d8ac14acb2d7c711596a5cd1974a42112cb07.tar.xz
yuzu-228d8ac14acb2d7c711596a5cd1974a42112cb07.zip
Service/CFG: Add block 0x000A0000 (username) to default config file
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/cfg/cfg.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/core/hle/service/cfg/cfg.cpp b/src/core/hle/service/cfg/cfg.cpp
index 7556aa6a5..4bf0d446b 100644
--- a/src/core/hle/service/cfg/cfg.cpp
+++ b/src/core/hle/service/cfg/cfg.cpp
@@ -4,9 +4,10 @@
4 4
5#include <algorithm> 5#include <algorithm>
6 6
7#include "common/file_util.h"
7#include "common/logging/log.h" 8#include "common/logging/log.h"
8#include "common/string_util.h" 9#include "common/string_util.h"
9#include "common/file_util.h" 10#include "common/swap.h"
10 11
11#include "core/file_sys/archive_systemsavedata.h" 12#include "core/file_sys/archive_systemsavedata.h"
12#include "core/file_sys/file_backend.h" 13#include "core/file_sys/file_backend.h"
@@ -334,6 +335,18 @@ ResultCode FormatConfig() {
334 res = CreateConfigInfoBlk(0x000A0000, sizeof(CONSOLE_USERNAME_BLOCK), 0xE, &CONSOLE_USERNAME_BLOCK); 335 res = CreateConfigInfoBlk(0x000A0000, sizeof(CONSOLE_USERNAME_BLOCK), 0xE, &CONSOLE_USERNAME_BLOCK);
335 if (!res.IsSuccess()) return res; 336 if (!res.IsSuccess()) return res;
336 337
338 // 0x000A0000 - Profile username
339 struct {
340 u16_le username[10];
341 u8 unused[4];
342 u32_le wordfilter_version; // Unused by Citra
343 } profile_username = {};
344
345 std::u16string username_string = Common::UTF8ToUTF16("Citra");
346 std::copy(username_string.cbegin(), username_string.cend(), profile_username.username);
347 res = CreateConfigInfoBlk(0x000A0000, sizeof(profile_username), 0xE, &profile_username);
348 if (!res.IsSuccess()) return res;
349
337 // 0x000A0001 - Profile birthday 350 // 0x000A0001 - Profile birthday
338 const u8 profile_birthday[2] = {3, 25}; // March 25th, 2014 351 const u8 profile_birthday[2] = {3, 25}; // March 25th, 2014
339 res = CreateConfigInfoBlk(0x000A0001, sizeof(profile_birthday), 0xE, profile_birthday); 352 res = CreateConfigInfoBlk(0x000A0001, sizeof(profile_birthday), 0xE, profile_birthday);