settings: Add option to set BCAT backend
This commit is contained in:
parent
532ec459b8
commit
647992e666
|
@ -103,6 +103,8 @@ void LogSettings() {
|
|||
LogSetting("Debugging_UseGdbstub", Settings::values.use_gdbstub);
|
||||
LogSetting("Debugging_GdbstubPort", Settings::values.gdbstub_port);
|
||||
LogSetting("Debugging_ProgramArgs", Settings::values.program_args);
|
||||
LogSetting("Services_BCATBackend", Settings::values.bcat_backend);
|
||||
LogSetting("Services_BCATBoxcatLocal", Settings::values.bcat_boxcat_local);
|
||||
}
|
||||
|
||||
} // namespace Settings
|
||||
|
|
|
@ -448,6 +448,10 @@ struct Values {
|
|||
bool reporting_services;
|
||||
bool quest_flag;
|
||||
|
||||
// BCAT
|
||||
std::string bcat_backend;
|
||||
bool bcat_boxcat_local;
|
||||
|
||||
// WebService
|
||||
bool enable_telemetry;
|
||||
std::string web_api_url;
|
||||
|
|
|
@ -525,6 +525,13 @@ void Config::ReadDebuggingValues() {
|
|||
qt_config->endGroup();
|
||||
}
|
||||
|
||||
void Config::ReadServiceValues() {
|
||||
qt_config->beginGroup("Services");
|
||||
Settings::values.bcat_backend = ReadSetting("bcat_backend", "boxcat").toString().toStdString();
|
||||
Settings::values.bcat_boxcat_local = ReadSetting("bcat_boxcat_local", false).toBool();
|
||||
qt_config->endGroup();
|
||||
}
|
||||
|
||||
void Config::ReadDisabledAddOnValues() {
|
||||
const auto size = qt_config->beginReadArray(QStringLiteral("DisabledAddOns"));
|
||||
|
||||
|
@ -769,6 +776,7 @@ void Config::ReadValues() {
|
|||
ReadMiscellaneousValues();
|
||||
ReadDebuggingValues();
|
||||
ReadWebServiceValues();
|
||||
ReadServiceValues();
|
||||
ReadDisabledAddOnValues();
|
||||
ReadUIValues();
|
||||
}
|
||||
|
@ -866,6 +874,7 @@ void Config::SaveValues() {
|
|||
SaveMiscellaneousValues();
|
||||
SaveDebuggingValues();
|
||||
SaveWebServiceValues();
|
||||
SaveServiceValues();
|
||||
SaveDisabledAddOnValues();
|
||||
SaveUIValues();
|
||||
}
|
||||
|
@ -963,6 +972,13 @@ void Config::SaveDebuggingValues() {
|
|||
qt_config->endGroup();
|
||||
}
|
||||
|
||||
void Config::SaveServiceValues() {
|
||||
qt_config->beginGroup("Services");
|
||||
WriteSetting("bcat_backend", QString::fromStdString(Settings::values.bcat_backend), "null");
|
||||
WriteSetting("bcat_boxcat_local", Settings::values.bcat_boxcat_local, false);
|
||||
qt_config->endGroup();
|
||||
}
|
||||
|
||||
void Config::SaveDisabledAddOnValues() {
|
||||
qt_config->beginWriteArray(QStringLiteral("DisabledAddOns"));
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ private:
|
|||
void ReadCoreValues();
|
||||
void ReadDataStorageValues();
|
||||
void ReadDebuggingValues();
|
||||
void ReadServiceValues();
|
||||
void ReadDisabledAddOnValues();
|
||||
void ReadMiscellaneousValues();
|
||||
void ReadPathValues();
|
||||
|
@ -65,6 +66,7 @@ private:
|
|||
void SaveCoreValues();
|
||||
void SaveDataStorageValues();
|
||||
void SaveDebuggingValues();
|
||||
void SaveServiceValues();
|
||||
void SaveDisabledAddOnValues();
|
||||
void SaveMiscellaneousValues();
|
||||
void SavePathValues();
|
||||
|
|
|
@ -433,6 +433,11 @@ void Config::ReadValues() {
|
|||
sdl2_config->Get("WebService", "web_api_url", "https://api.yuzu-emu.org");
|
||||
Settings::values.yuzu_username = sdl2_config->Get("WebService", "yuzu_username", "");
|
||||
Settings::values.yuzu_token = sdl2_config->Get("WebService", "yuzu_token", "");
|
||||
|
||||
// Services
|
||||
Settings::values.bcat_backend = sdl2_config->Get("Services", "bcat_backend", "boxcat");
|
||||
Settings::values.bcat_boxcat_local =
|
||||
sdl2_config->GetBoolean("Services", "bcat_boxcat_local", false);
|
||||
}
|
||||
|
||||
void Config::Reload() {
|
||||
|
|
|
@ -251,6 +251,11 @@ web_api_url = https://api.yuzu-emu.org
|
|||
yuzu_username =
|
||||
yuzu_token =
|
||||
|
||||
[Services]
|
||||
# The name of the backend to use for BCAT
|
||||
# If this is set to 'boxcat' boxcat will be used, otherwise a null implementation will be used
|
||||
bcat_backend =
|
||||
|
||||
[AddOns]
|
||||
# Used to disable add-ons
|
||||
# List of title IDs of games that will have add-ons disabled (separated by '|'):
|
||||
|
|
Loading…
Reference in New Issue