mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-22 10:19:01 +00:00
pull in rust updates
This commit is contained in:
parent
0c98be8eff
commit
065823f71e
3 changed files with 9 additions and 11 deletions
|
@ -155,11 +155,11 @@ pub fn update_container(kind: *const c_char, enabled: bool, level: c_int) {
|
|||
pub fn mainline_update_log_level(level: c_int) {
|
||||
let containers = LOG_CONTAINERS
|
||||
.get()
|
||||
.expect("[dolphin_logger::update_container]: Attempting to get `LOG_CONTAINERS` before init");
|
||||
.expect("[dolphin_logger::mainline_update_log_level]: Attempting to get `LOG_CONTAINERS` before init");
|
||||
|
||||
let mut writer = containers
|
||||
.write()
|
||||
.expect("[dolphin_logger::update_container]: Unable to acquire write lock on `LOG_CONTAINERS`?");
|
||||
.expect("[dolphin_logger::mainline_update_log_level]: Unable to acquire write lock on `LOG_CONTAINERS`?");
|
||||
|
||||
for container in (*writer).iter_mut() {
|
||||
container.level = convert_dolphin_log_level_to_tracing_level(level);
|
||||
|
|
|
@ -43,4 +43,4 @@ pub extern "C" fn slprs_logging_update_container(kind: *const c_char, enabled: b
|
|||
#[no_mangle]
|
||||
pub extern "C" fn slprs_mainline_logging_update_log_level(level: c_int) {
|
||||
dolphin_integrations::ffi::logger::mainline_update_log_level(level);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,12 +47,10 @@ pub struct GameReporterQueue {
|
|||
impl GameReporterQueue {
|
||||
/// Initializes and returns a new game reporter.
|
||||
pub(crate) fn new() -> Self {
|
||||
// `max_idle_connections` is set to `0` to mimic how the CURL setup in the
|
||||
// C++ version was done - i.e, I don't want to introduce connection pooling
|
||||
// without Fizzi/Nikki opting in to it.
|
||||
// We set `max_idle_connections` to `5` to mimic how CURL was configured in
|
||||
// the old C++ version of this module.
|
||||
let http_client = ureq::AgentBuilder::new()
|
||||
//.https_only(true)
|
||||
.max_idle_connections(0)
|
||||
.max_idle_connections(5)
|
||||
.user_agent("SlippiGameReporter/Rust v0.1")
|
||||
.build();
|
||||
|
||||
|
@ -103,10 +101,10 @@ impl GameReporterQueue {
|
|||
|
||||
match res {
|
||||
Ok(value) if value == "true" => {
|
||||
tracing::info!(target: Log::GameReporter, "Successfully executed abandonment request")
|
||||
tracing::info!(target: Log::GameReporter, "Successfully executed completion request")
|
||||
},
|
||||
Ok(value) => tracing::error!(target: Log::GameReporter, ?value, "Error executing abandonment request",),
|
||||
Err(error) => tracing::error!(target: Log::GameReporter, ?error, "Error executing abandonment request"),
|
||||
Ok(value) => tracing::error!(target: Log::GameReporter, ?value, "Error executing completion request",),
|
||||
Err(error) => tracing::error!(target: Log::GameReporter, ?error, "Error executing completion request"),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue