more error messages (#836)

This commit is contained in:
Logan McNaughton 2026-05-04 10:36:50 +02:00 committed by GitHub
parent 90052257bb
commit 883852a828
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 9 additions and 1 deletions

View File

@ -48,7 +48,7 @@ pub fn init(
{
option_value = Some(found_option_value.to_string());
} else {
println!("Cheat option: {option} not found");
eprintln!("Cheat option: {option} not found");
continue;
}
}

View File

@ -92,6 +92,8 @@ pub fn create_savestate(device: &device::Device) {
eprintln!("Error writing savestate: {}", e);
}
});
} else {
eprintln!("Error compressing savestate");
}
ui::video::onscreen_message(
&format!(

View File

@ -41,6 +41,7 @@ fn check_latest_version(weak: slint::Weak<AppWindow>) {
{
github_version
} else {
eprintln!("Error getting latest version from GitHub");
semver::Version::parse(env!("CARGO_PKG_VERSION")).unwrap()
};
let current_version = semver::Version::parse(env!("CARGO_PKG_VERSION")).unwrap();

View File

@ -463,6 +463,7 @@ pub fn get(ui: &mut ui::Ui, channel: usize) -> InputData {
let profile_name = &ui.config.input.input_profile_binding[channel];
let Some(profile) = ui.config.input.input_profiles.get(profile_name) else {
eprintln!("Invalid profile name: {profile_name}");
return InputData {
data: 0,
pak_change_pressed: false,
@ -546,6 +547,8 @@ pub fn assign_controller(ui: &mut ui::Ui, controller: i32, port: usize) {
if !path.is_null() {
ui.config.input.controller_assignment[port - 1] =
Some(unsafe { std::ffi::CStr::from_ptr(path).to_str().unwrap().to_string() });
} else {
eprintln!("Invalid controller path for controller {controller}");
}
} else {
eprintln!("Invalid controller number")

View File

@ -141,6 +141,8 @@ fn populate_server_names<T: ComponentHandle + NetplayPages + 'static>(weak: slin
local_servers.push((server.0.into(), server.1.into()));
}
}
} else {
eprintln!("Error creating netplay broadcast socket");
}
let response = task.await;