mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-28 05:11:37 +00:00
Minor installer wizard fixes.
This commit is contained in:
parent
dd2860d36e
commit
91e6f49231
1 changed files with 14 additions and 3 deletions
|
|
@ -911,7 +911,6 @@ static void PickerThreadProcess()
|
||||||
}
|
}
|
||||||
|
|
||||||
g_currentPickerResultsReady = true;
|
g_currentPickerResultsReady = true;
|
||||||
g_currentPickerVisible = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ShowPicker(bool folderMode)
|
static void ShowPicker(bool folderMode)
|
||||||
|
|
@ -926,6 +925,12 @@ static void ShowPicker(bool folderMode)
|
||||||
g_currentPickerFolderMode = folderMode;
|
g_currentPickerFolderMode = folderMode;
|
||||||
g_currentPickerResultsReady = false;
|
g_currentPickerResultsReady = false;
|
||||||
g_currentPickerVisible = true;
|
g_currentPickerVisible = true;
|
||||||
|
|
||||||
|
// Optional single thread mode for testing on systems that do not interact well with the separate thread being used for NFD.
|
||||||
|
constexpr bool singleThreadMode = false;
|
||||||
|
if (singleThreadMode)
|
||||||
|
PickerThreadProcess();
|
||||||
|
else
|
||||||
g_currentPickerThread = std::make_unique<std::thread>(PickerThreadProcess);
|
g_currentPickerThread = std::make_unique<std::thread>(PickerThreadProcess);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1410,13 +1415,19 @@ void InstallerWizard::Draw()
|
||||||
|
|
||||||
void InstallerWizard::Shutdown()
|
void InstallerWizard::Shutdown()
|
||||||
{
|
{
|
||||||
// Wait for and erase the thread.
|
// Wait for and erase the threads.
|
||||||
if (g_installerThread != nullptr)
|
if (g_installerThread != nullptr)
|
||||||
{
|
{
|
||||||
g_installerThread->join();
|
g_installerThread->join();
|
||||||
g_installerThread.reset();
|
g_installerThread.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_currentPickerThread != nullptr)
|
||||||
|
{
|
||||||
|
g_currentPickerThread->join();
|
||||||
|
g_currentPickerThread.reset();
|
||||||
|
}
|
||||||
|
|
||||||
// Erase the sources.
|
// Erase the sources.
|
||||||
g_installerSources.game.reset();
|
g_installerSources.game.reset();
|
||||||
g_installerSources.update.reset();
|
g_installerSources.update.reset();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue