mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-01-13 08:39:09 +01:00
Fixed ViGEm installer download in Welcome Dialog
This commit is contained in:
parent
09f7635b47
commit
32328e0e15
@ -244,6 +244,7 @@ namespace DS4WinWPF
|
||||
}
|
||||
else if (parser.Driverinstall)
|
||||
{
|
||||
CreateBaseThread();
|
||||
DS4Forms.WelcomeDialog dialog = new DS4Forms.WelcomeDialog(true);
|
||||
dialog.ShowDialog();
|
||||
runShutdown = false;
|
||||
@ -309,6 +310,20 @@ namespace DS4WinWPF
|
||||
Thread.SpinWait(500);
|
||||
}
|
||||
|
||||
private void CreateBaseThread()
|
||||
{
|
||||
controlThread = new Thread(() => {
|
||||
DS4Windows.Program.rootHub = rootHub;
|
||||
requestClient = new HttpClient();
|
||||
collectTimer = new Timer(GarbageTask, null, 30000, 30000);
|
||||
});
|
||||
controlThread.Priority = ThreadPriority.Normal;
|
||||
controlThread.IsBackground = true;
|
||||
controlThread.Start();
|
||||
while (controlThread.IsAlive)
|
||||
Thread.SpinWait(500);
|
||||
}
|
||||
|
||||
private void GarbageTask(object state)
|
||||
{
|
||||
GC.Collect(0, GCCollectionMode.Forced, false);
|
||||
|
@ -61,7 +61,7 @@ namespace DS4WinWPF.DS4Forms
|
||||
// This is your progress event!
|
||||
// It will fire on every buffer fill so don't do anything expensive.
|
||||
// Writing to the console IS expensive, so don't do the following in practice...
|
||||
vigemInstallBtn.Content = Properties.Resources.Downloading.Replace("*number*",
|
||||
vigemInstallBtn.Content = Properties.Resources.Downloading.Replace("*number*%",
|
||||
x.PercentComplete.ToString("P"));
|
||||
//Console.WriteLine(x.PercentComplete.ToString("P"));
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user