SaveTool: fix the checker mutex not unlocking properly.
This commit is contained in:
parent
e4ef5d4423
commit
57b4af4637
1 changed files with 10 additions and 8 deletions
|
@ -132,14 +132,16 @@ SaveTool::drawMainMenu() {
|
||||||
_updateThread = std::thread{[this]{ checkForUpdates(); }};
|
_updateThread = std::thread{[this]{ checkForUpdates(); }};
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_checker && (_checkerMutex.try_lock() && _checker->updateAvailable())) {
|
if(_checker && _checkerMutex.try_lock()) {
|
||||||
drawAlignedText("Version %s is available.", Containers::String{_checker->version()}.data());
|
if(_checker->updateAvailable()) {
|
||||||
if(ImGui::Button(ICON_FA_FILE_SIGNATURE " Release notes")) {
|
drawAlignedText("Version %s is available.", Containers::String{_checker->version()}.data());
|
||||||
openUri("https://williamjcm.ovh/mbst");
|
if(ImGui::Button(ICON_FA_FILE_SIGNATURE " Release notes")) {
|
||||||
}
|
openUri("https://williamjcm.ovh/mbst");
|
||||||
ImGui::SameLine();
|
}
|
||||||
if(ImGui::Button(ICON_FA_DOWNLOAD " Download now")) {
|
ImGui::SameLine();
|
||||||
openUri(_checker->downloadLink());
|
if(ImGui::Button(ICON_FA_DOWNLOAD " Download now")) {
|
||||||
|
openUri(_checker->downloadLink());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_checkerMutex.unlock();
|
_checkerMutex.unlock();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue