diff options
Diffstat (limited to 'src-tauri/src')
| -rw-r--r-- | src-tauri/src/core/config.rs | 2 | ||||
| -rw-r--r-- | src-tauri/src/main.rs | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src-tauri/src/core/config.rs b/src-tauri/src/core/config.rs index 47c5306..dc72dcb 100644 --- a/src-tauri/src/core/config.rs +++ b/src-tauri/src/core/config.rs @@ -11,6 +11,7 @@ pub struct LauncherConfig { pub java_path: String, pub width: u32, pub height: u32, + pub download_threads: u32, // concurrent download threads } impl Default for LauncherConfig { @@ -21,6 +22,7 @@ impl Default for LauncherConfig { java_path: "java".to_string(), width: 854, height: 480, + download_threads: 32, } } } diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index d7ae9a4..73310d5 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -262,8 +262,8 @@ async fn start_game( )); // 4. Start Download - emit_log!(window, "Starting downloads...".to_string()); - core::downloader::download_files(window.clone(), download_tasks) + emit_log!(window, format!("Starting downloads with {} concurrent threads...", config.download_threads)); + core::downloader::download_files(window.clone(), download_tasks, config.download_threads as usize) .await .map_err(|e| e.to_string())?; emit_log!(window, "All downloads completed successfully".to_string()); |