mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2025-01-28 21:37:10 +00:00
Fix a couple of warnings[ci skip]
This commit is contained in:
parent
44c6af2146
commit
02e1763e1d
|
@ -218,14 +218,19 @@ impl Game {
|
||||||
// one or deinited(so we can't create the console-only logger and replace it by the
|
// one or deinited(so we can't create the console-only logger and replace it by the
|
||||||
// console&file logger after FilesystemContainer has been initialized)
|
// console&file logger after FilesystemContainer has been initialized)
|
||||||
fn get_logs_dir() -> GameResult<PathBuf> {
|
fn get_logs_dir() -> GameResult<PathBuf> {
|
||||||
let mut logs_dir = PathBuf::new();
|
let mut logs_dir: PathBuf;
|
||||||
|
|
||||||
|
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
{
|
{
|
||||||
logs_dir = PathBuf::from(ndk_glue::native_activity().internal_data_path().to_string_lossy().to_string());
|
logs_dir = PathBuf::from(ndk_glue::native_activity().internal_data_path().to_string_lossy().to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_os = "horizon")]
|
||||||
|
{
|
||||||
|
logs_dir = PathBuf::from("sdmc:/switch/doukutsu-rs");
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(not(any(target_os = "android", target_os = "horizon")))]
|
#[cfg(not(any(target_os = "android", target_os = "horizon")))]
|
||||||
{
|
{
|
||||||
let project_dirs = match directories::ProjectDirs::from("", "", "doukutsu-rs") {
|
let project_dirs = match directories::ProjectDirs::from("", "", "doukutsu-rs") {
|
||||||
|
@ -237,19 +242,13 @@ fn get_logs_dir() -> GameResult<PathBuf> {
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
logs_dir = project_dirs.data_local_dir().to_path_buf();
|
logs_dir = project_dirs.data_local_dir().to_path_buf();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "horizon")]
|
|
||||||
{
|
|
||||||
logs_dir = PathBuf::from("sdmc:/switch/doukutsu-rs");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
logs_dir.push("logs");
|
logs_dir.push("logs");
|
||||||
|
|
||||||
|
|
||||||
Ok(logs_dir)
|
Ok(logs_dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -451,6 +451,7 @@ impl SharedGameState {
|
||||||
let more_rust = (current_time.month() == 7 && current_time.day() == 7) || settings.more_rust;
|
let more_rust = (current_time.month() == 7 && current_time.day() == 7) || settings.more_rust;
|
||||||
let seed = chrono::Local::now().timestamp() as i32;
|
let seed = chrono::Local::now().timestamp() as i32;
|
||||||
|
|
||||||
|
#[cfg(feature = "discord-rpc")]
|
||||||
let discord_rpc_app_id = match option_env!("DISCORD_RPC_APP_ID") {
|
let discord_rpc_app_id = match option_env!("DISCORD_RPC_APP_ID") {
|
||||||
Some(app_id) => app_id,
|
Some(app_id) => app_id,
|
||||||
None => "1076523467337367622",
|
None => "1076523467337367622",
|
||||||
|
|
Loading…
Reference in a new issue