Skip to content

Commit

Permalink
Eliniated a redundant DLL refresh on launch
Browse files Browse the repository at this point in the history
  • Loading branch information
Aemony committed Feb 3, 2024
1 parent 93b309c commit d6e63eb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/SKIF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2781,7 +2781,7 @@ wWinMain ( _In_ HINSTANCE hInstance,
static SKIF_DirectoryWatch root_folder;
static DWORD root_folder_signaled = 0;
const DWORD root_folder_auto_refresh = 1000;
if (root_folder.isSignaled (_path_cache.specialk_install, UITab_ALL))
if (SKIF_Notify_hWnd != NULL && SKIF_ImGui_hWnd != NULL && root_folder.isSignaled (_path_cache.specialk_install, UITab_ALL, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME))
{
root_folder_signaled = SKIF_Util_timeGetTime ( );

Expand All @@ -2790,7 +2790,8 @@ wWinMain ( _In_ HINSTANCE hInstance,
}

// if we were signaled more than 5 seconds ago, do the usual refesh
if (root_folder_signaled > 0 && root_folder_signaled + root_folder_auto_refresh < SKIF_Util_timeGetTime ( ))
// ... or if we are refreshing the view!
if ((root_folder_signaled > 0 && root_folder_signaled + root_folder_auto_refresh < SKIF_Util_timeGetTime ( )) || hotkeyCtrlR || hotkeyF5)
{ root_folder_signaled = 0;

// Destroy the timer
Expand Down

0 comments on commit d6e63eb

Please sign in to comment.