Skip to content

Commit

Permalink
Fixed missing KillTimer.
Browse files Browse the repository at this point in the history
  • Loading branch information
ai4rei committed Dec 6, 2020
1 parent 03323d0 commit 96961a3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions splash.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ static VOID CALLBACK SplashScreenOnEventShow(HWINEVENTHOOK hWinEventHook, DWORD

if(hWndSplash!=NULL)
{
/* Maybe the splash screen did not show up, yet. */
KillTimer(hWndSplash, IDT_DELAYSHOW);

/* Delay removal so that it does not look like the main
window covers the splash screen. */
SetTimer(hWndSplash, IDT_DELAYHIDE, 200, NULL);
Expand Down Expand Up @@ -251,12 +254,16 @@ static VOID CALLBACK SplashScreenWndProcOnTimer(HWND hWnd, UINT uId)
switch(uId)
{
case IDT_DELAYSHOW:
KillTimer(hWnd, uId);

if(!IsAnimateWindowBlendSupported() || !AnimateWindow(hWnd, 200, AW_BLEND))
{
ShowWindow(hWnd, SW_SHOWNORMAL);
}
break;
case IDT_DELAYHIDE:
KillTimer(hWnd, uId);

if(!IsAnimateWindowBlendSupported() || !AnimateWindow(hWnd, 200, AW_BLEND|AW_HIDE))
{
ShowWindow(hWnd, SW_HIDE);
Expand Down

0 comments on commit 96961a3

Please sign in to comment.