Merge pull request #3951 from zhaowenlan1779/cfg-country-code
service/cfg, citra_qt: add country code configuration
This commit is contained in:
commit
71729fd47a
5 changed files with 243 additions and 1 deletions
|
@ -666,6 +666,17 @@ SoundOutputMode Module::GetSoundOutputMode() {
|
|||
return static_cast<SoundOutputMode>(block);
|
||||
}
|
||||
|
||||
void Module::SetCountryCode(u8 country_code) {
|
||||
ConsoleCountryInfo block = {{0, 0, 0}, country_code};
|
||||
SetConfigInfoBlock(CountryInfoBlockID, sizeof(block), 4, &block);
|
||||
}
|
||||
|
||||
u8 Module::GetCountryCode() {
|
||||
ConsoleCountryInfo block;
|
||||
GetConfigInfoBlock(CountryInfoBlockID, sizeof(block), 8, &block);
|
||||
return block.country_code;
|
||||
}
|
||||
|
||||
void Module::GenerateConsoleUniqueId(u32& random_number, u64& console_id) {
|
||||
CryptoPP::AutoSeededRandomPool rng;
|
||||
random_number = rng.GenerateWord32(0, 0xFFFF);
|
||||
|
|
|
@ -357,6 +357,18 @@ public:
|
|||
*/
|
||||
SoundOutputMode GetSoundOutputMode();
|
||||
|
||||
/**
|
||||
* Sets the country code in config savegame.
|
||||
* @param country_code the country code to set
|
||||
*/
|
||||
void SetCountryCode(u8 country_code);
|
||||
|
||||
/**
|
||||
* Gets the country code from config savegame.
|
||||
* @returns the country code
|
||||
*/
|
||||
u8 GetCountryCode();
|
||||
|
||||
/**
|
||||
* Generates a new random console unique id.
|
||||
* @param random_number a random generated 16bit number stored at 0x90002, used for generating
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue