From 7b484538db8e30b0a20315ffc448b342dd39c67f Mon Sep 17 00:00:00 2001 From: Alexey 'Cluster' Avdyukhin Date: Sat, 7 Oct 2017 12:29:46 +0300 Subject: Many tiny fixes, rc5 --- WorkerForm.cs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'WorkerForm.cs') diff --git a/WorkerForm.cs b/WorkerForm.cs index 1ae07d59..81056349 100644 --- a/WorkerForm.cs +++ b/WorkerForm.cs @@ -487,7 +487,7 @@ namespace com.clusterrr.hakchi_gui { int progress = 0; int maxProgress = 115 + (string.IsNullOrEmpty(Mod) ? 0 : 110) + - ((hmodsInstall != null && hmodsInstall.Count() > 0) ? 184 : 0); + ((hmodsInstall != null && hmodsInstall.Count() > 0) ? 150 : 0); var tempKernelPath = Path.Combine(tempDirectory, "kernel.img"); var hmods = hmodsInstall; hmodsInstall = null; @@ -946,13 +946,6 @@ namespace com.clusterrr.hakchi_gui { SetProgress(progress, maxProgress < 0 ? 1000 : maxProgress); - int waitSeconds; - if ((hmodsInstall != null && hmodsInstall.Count() > 0) - || (hmodsUninstall != null && hmodsUninstall.Count() > 0)) - waitSeconds = 60; - else - waitSeconds = 5; - // Connecting to NES Mini if (WaitForFelFromThread() != DialogResult.OK) { @@ -984,7 +977,7 @@ namespace com.clusterrr.hakchi_gui } progress += 5; if (maxProgress < 0) - maxProgress = (int)((double)kernel.Length / (double)67000 + waitSeconds * 2 + 12); + maxProgress = (int)((double)kernel.Length / (double)67000 + 50); SetProgress(progress, maxProgress); SetStatus(Resources.UploadingKernel); @@ -1005,6 +998,14 @@ namespace com.clusterrr.hakchi_gui var bootCommand = string.Format("boota {0:x}", Fel.transfer_base_m); SetStatus(Resources.ExecutingCommand + " " + bootCommand); fel.RunUbootCmd(bootCommand, true); + + // Wait some time while booting + int waitSeconds; + if ((hmodsInstall != null && hmodsInstall.Count() > 0) + || (hmodsUninstall != null && hmodsUninstall.Count() > 0)) + waitSeconds = 60; + else + waitSeconds = 5; for (int i = 0; i < waitSeconds * 2; i++) { Thread.Sleep(500); -- cgit v1.2.3