Fix a couple of warnings[ci skip]

This commit is contained in:
biroder 2023-07-05 11:58:54 +03:00
parent 44c6af2146
commit 02e1763e1d
2 changed files with 14 additions and 14 deletions

View File

@ -218,14 +218,19 @@ impl Game {
// 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)
fn get_logs_dir() -> GameResult<PathBuf> {
let mut logs_dir = PathBuf::new();
let mut logs_dir: PathBuf;
#[cfg(target_os = "android")]
{
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")))]
{
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();
}
#[cfg(target_os = "horizon")]
{
logs_dir = PathBuf::from("sdmc:/switch/doukutsu-rs");
}
logs_dir.push("logs");
Ok(logs_dir)
}

View File

@ -451,6 +451,7 @@ impl SharedGameState {
let more_rust = (current_time.month() == 7 && current_time.day() == 7) || settings.more_rust;
let seed = chrono::Local::now().timestamp() as i32;
#[cfg(feature = "discord-rpc")]
let discord_rpc_app_id = match option_env!("DISCORD_RPC_APP_ID") {
Some(app_id) => app_id,
None => "1076523467337367622",