diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-10-07 12:29:46 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-10-07 12:32:01 +0300 |
commit | 7b484538db8e30b0a20315ffc448b342dd39c67f (patch) | |
tree | 62a105955d9307a732ddc7e1816222df2e4df0ac /WorkerForm.cs | |
parent | c7fc8c5989cd3ae6bb2bdc93c9978fb53fd55829 (diff) |
Many tiny fixes, rc5
Diffstat (limited to 'WorkerForm.cs')
-rw-r--r-- | WorkerForm.cs | 19 |
1 files changed, 10 insertions, 9 deletions
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);
|