mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-10 21:00:06 +00:00
Artic Base: Implement DLC support and other fixes (#173)
* Artic Base: Implement DLC support and other fixes * Fix per game settings not working with artic loader * Fix compilation error
This commit is contained in:
parent
1e2be72e5e
commit
4780a7134d
16 changed files with 992 additions and 236 deletions
|
@ -197,7 +197,8 @@ bool Client::Connect() {
|
|||
shutdown(main_socket, SHUT_RDWR);
|
||||
closesocket(main_socket);
|
||||
LOG_ERROR(Network, "Incompatible server version: {}", version_value);
|
||||
SignalCommunicationError();
|
||||
SignalCommunicationError("\nIncompatible Artic Base Server version.\nCheck for updates "
|
||||
"to Artic Base Server or Citra.");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
@ -369,11 +370,11 @@ std::optional<Client::Response> Client::Send(Request& request) {
|
|||
return std::optional<Client::Response>(std::move(resp.response));
|
||||
}
|
||||
|
||||
void Client::SignalCommunicationError() {
|
||||
void Client::SignalCommunicationError(const std::string& msg) {
|
||||
StopImpl(true);
|
||||
LOG_CRITICAL(Network, "Communication error");
|
||||
if (communication_error_callback)
|
||||
communication_error_callback();
|
||||
communication_error_callback(msg);
|
||||
}
|
||||
|
||||
void Client::PingFunction() {
|
||||
|
|
|
@ -80,7 +80,7 @@ public:
|
|||
StopImpl(false);
|
||||
}
|
||||
|
||||
void SetCommunicationErrorCallback(const std::function<void()>& callback) {
|
||||
void SetCommunicationErrorCallback(const std::function<void(const std::string&)>& callback) {
|
||||
communication_error_callback = callback;
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
static constexpr const int SERVER_VERSION = 0;
|
||||
static constexpr const int SERVER_VERSION = 1;
|
||||
|
||||
std::string address;
|
||||
u16 port;
|
||||
|
@ -109,8 +109,8 @@ private:
|
|||
return currRequestID++;
|
||||
}
|
||||
|
||||
void SignalCommunicationError();
|
||||
std::function<void()> communication_error_callback;
|
||||
void SignalCommunicationError(const std::string& msg = "");
|
||||
std::function<void(const std::string&)> communication_error_callback;
|
||||
|
||||
std::function<void(u64)> report_artic_event_callback;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue