Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-10-07 00:19:55 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-10-07 00:19:55 +0300
commitdbb150b24b1ea5759c07d92088adfbf9996be2a3 (patch)
treea36891dfcf376ee92209c0470f517eaa6f72a0dd /WorkerForm.cs
parentf9ee7d91ca1fe31d5dcecfddcfe5ed5acad1a0b4 (diff)
Some fixes and tuning
Diffstat (limited to 'WorkerForm.cs')
-rw-r--r--WorkerForm.cs18
1 files changed, 14 insertions, 4 deletions
diff --git a/WorkerForm.cs b/WorkerForm.cs
index b4eba6e9..1ae07d59 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) ? 80 : 0);
+ ((hmodsInstall != null && hmodsInstall.Count() > 0) ? 184 : 0);
var tempKernelPath = Path.Combine(tempDirectory, "kernel.img");
var hmods = hmodsInstall;
hmodsInstall = null;
@@ -945,6 +945,14 @@ namespace com.clusterrr.hakchi_gui
public void Memboot(int maxProgress = -1, int progress = 0)
{
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)
{
@@ -976,7 +984,7 @@ namespace com.clusterrr.hakchi_gui
}
progress += 5;
if (maxProgress < 0)
- maxProgress = (int)((double)kernel.Length / (double)67000 + 22);
+ maxProgress = (int)((double)kernel.Length / (double)67000 + waitSeconds * 2 + 12);
SetProgress(progress, maxProgress);
SetStatus(Resources.UploadingKernel);
@@ -997,11 +1005,13 @@ namespace com.clusterrr.hakchi_gui
var bootCommand = string.Format("boota {0:x}", Fel.transfer_base_m);
SetStatus(Resources.ExecutingCommand + " " + bootCommand);
fel.RunUbootCmd(bootCommand, true);
- for (int i = 0; i < 10; i++)
+ for (int i = 0; i < waitSeconds * 2; i++)
{
- Thread.Sleep(1500);
+ Thread.Sleep(500);
progress++;
SetProgress(progress, maxProgress);
+ if (MainForm.Clovershell.IsOnline)
+ break;
}
#if !DEBUG
if (Directory.Exists(tempDirectory))