mirror of https://github.com/RPCS3/rpcs3.git
PKG installer fix
This commit is contained in:
parent
a186af32ec
commit
04926374f7
|
@ -283,13 +283,15 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
|
||||||
if (pkg_install(pkg_f, local_path + '/', progress))
|
if (pkg_install(pkg_f, local_path + '/', progress))
|
||||||
{
|
{
|
||||||
progress = 1.;
|
progress = 1.;
|
||||||
|
return_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Ask user to delete files on cancellation/failure?
|
// TODO: Ask user to delete files on cancellation/failure?
|
||||||
|
progress = -1.;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Wait for the completion
|
// Wait for the completion
|
||||||
while (std::this_thread::sleep_for(5ms), progress < 1.)
|
while (std::this_thread::sleep_for(5ms), std::abs(progress) < 1.)
|
||||||
{
|
{
|
||||||
// Update progress window
|
// Update progress window
|
||||||
if (!pdlg.Update(static_cast<int>(progress * pdlg.GetRange())))
|
if (!pdlg.Update(static_cast<int>(progress * pdlg.GetRange())))
|
||||||
|
@ -299,6 +301,12 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (progress > 0.)
|
||||||
|
{
|
||||||
|
pdlg.Update(pdlg.GetRange());
|
||||||
|
std::this_thread::sleep_for(100ms);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pdlg.Close();
|
pdlg.Close();
|
||||||
|
|
Loading…
Reference in New Issue