Check that the country setting is valid for selected region (#847)

* Check that the country setting is valid for selected region

* `SystemSaveGame.checkCountryCompatibility` -> `SystemSaveGame.getCountryCompatibility`

* SettingsFragmentPresenter.kt: Moved `checkCountryCompatibility` definition out of `addSystemSettings`

* SettingsFragmentPresenter.kt: Renamed `compat` value to `compatFlags` for better readability

* configure_system.ui: Corrected indentation

---------

Co-authored-by: OpenSauce04 <opensauce04@gmail.com>
This commit is contained in:
PabloMK7
2025-03-29 22:50:00 +01:00
committed by GitHub
parent eda2d6f9fa
commit 5c7622100b
16 changed files with 528 additions and 177 deletions

View File

@@ -471,6 +471,14 @@ std::optional<Client::Response> Client::Send(Request& request) {
return std::optional<Client::Response>(std::move(resp.response));
}
void Client::LogOnServer(ArticBaseCommon::LogOnServerType log_type, const std::string& message) {
auto req = NewRequest("__log");
req.AddParameterS8(static_cast<s8>(log_type));
req.AddParameterBuffer(message.data(), message.size());
Send(req);
}
void Client::SignalCommunicationError(const std::string& msg) {
StopImpl(true);
LOG_CRITICAL(Network, "Communication error");

View File

@@ -165,6 +165,8 @@ public:
ping_enabled = enable;
}
void LogOnServer(ArticBaseCommon::LogOnServerType log_type, const std::string& message);
private:
static constexpr const int SERVER_VERSION = 2;

View File

@@ -1,4 +1,4 @@
// Copyright 2024 Citra Emulator Project
// Copyright Citra Emulator Project / Azahar Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
@@ -31,6 +31,12 @@ enum class RequestParameterType : u16 {
IN_SMALL_BUFFER = 4,
IN_BIG_BUFFER = 5,
};
enum class LogOnServerType : u8 {
LOG_DEBUG = 0,
LOG_INFO = 1,
LOG_WARNING = 2,
LOG_ERROR = 3,
};
struct RequestParameter {
RequestParameterType type{};
union {