@@ -4,6 +4,7 @@ use crate::config::WandaConfig; |
| 4 | 4 | use crate::error::{Result, WandaError}; |
| 5 | 5 | use crate::steam::SteamInstallation; |
| 6 | 6 | use std::cmp::Ordering; |
| 7 | +use std::fmt; |
| 7 | 8 | use std::path::{Path, PathBuf}; |
| 8 | 9 | use tracing::{debug, info, warn}; |
| 9 | 10 | |
@@ -20,6 +21,17 @@ pub enum ProtonCompatibility { |
| 20 | 21 | Unsupported, |
| 21 | 22 | } |
| 22 | 23 | |
| 24 | +impl fmt::Display for ProtonCompatibility { |
| 25 | + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
| 26 | + match self { |
| 27 | + ProtonCompatibility::Recommended => write!(f, "Recommended"), |
| 28 | + ProtonCompatibility::Supported => write!(f, "Supported"), |
| 29 | + ProtonCompatibility::Experimental => write!(f, "Experimental"), |
| 30 | + ProtonCompatibility::Unsupported => write!(f, "Unsupported"), |
| 31 | + } |
| 32 | + } |
| 33 | +} |
| 34 | + |
| 23 | 35 | /// A detected Proton installation |
| 24 | 36 | #[derive(Debug, Clone)] |
| 25 | 37 | pub struct ProtonVersion { |
@@ -286,11 +298,32 @@ impl ProtonManager { |
| 286 | 298 | // Check user preference first |
| 287 | 299 | if let Some(ref preferred) = config.proton.preferred_version { |
| 288 | 300 | if let Some(v) = self.find_by_name(preferred) { |
| 289 | | - if v.compatibility == ProtonCompatibility::Unsupported { |
| 290 | | - warn!( |
| 291 | | - "Preferred Proton version {} has known compatibility issues", |
| 292 | | - v.name |
| 293 | | - ); |
| 301 | + match v.compatibility { |
| 302 | + ProtonCompatibility::Unsupported => { |
| 303 | + warn!( |
| 304 | + "Preferred Proton version '{}' is {} — it has known compatibility issues with WeMod", |
| 305 | + v.name, v.compatibility |
| 306 | + ); |
| 307 | + if let Some(rec) = self.get_recommended() { |
| 308 | + warn!( |
| 309 | + "Consider switching to '{}' ({}): wanda init --proton '{}'", |
| 310 | + rec.name, rec.compatibility, rec.name |
| 311 | + ); |
| 312 | + } |
| 313 | + } |
| 314 | + ProtonCompatibility::Experimental => { |
| 315 | + warn!( |
| 316 | + "Preferred Proton version '{}' is {} — GE-Proton 10.x wow64 mode can break WeMod's renderer", |
| 317 | + v.name, v.compatibility |
| 318 | + ); |
| 319 | + if let Some(rec) = self.get_recommended() { |
| 320 | + warn!( |
| 321 | + "Consider switching to '{}' ({}): wanda init --proton '{}'", |
| 322 | + rec.name, rec.compatibility, rec.name |
| 323 | + ); |
| 324 | + } |
| 325 | + } |
| 326 | + _ => {} |
| 294 | 327 | } |
| 295 | 328 | return Ok(v); |
| 296 | 329 | } |