Skip to content

Commit

Permalink
fix(updater): fix window not responding bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinipux322 committed Dec 24, 2022
1 parent a2faa72 commit 182bcd8
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions Updater/Updater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using namespace std::filesystem;

#define MAX_LOADSTRING 100
#define VERSION "1.0.1"
#define VERSION "1.0.2"

HINSTANCE hInst;
HWND hWnd;
Expand Down Expand Up @@ -79,18 +79,6 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
{
TranslateMessage(&msg);
DispatchMessage(&msg);
if (!isThreadStarted)
{
if (tickCount >= 100)
{
isThreadStarted = true;
t.join();
}
else
{
tickCount++;
}
}
}
}

Expand Down Expand Up @@ -332,7 +320,7 @@ void SetWindowData(std::wstring text, int progress)
currentText = text;
currentProgress = progress;

InvalidateRect(hWnd, nullptr, TRUE);
RedrawWindow(hWnd, nullptr, nullptr, RDW_INVALIDATE | RDW_UPDATENOW);
}

int GetCurrentProgress()
Expand Down

0 comments on commit 182bcd8

Please sign in to comment.