Skip to content

Commit

Permalink
Corrected some bugs/oversights
Browse files Browse the repository at this point in the history
  • Loading branch information
Aemony committed Jan 25, 2024
1 parent cbc0e3b commit d59c81b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/utility/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ struct SKIF_DirectoryWatch

void reset (void);

HANDLE _hChangeNotification = INVALID_HANDLE_VALUE;
HANDLE _hChangeNotification = INVALID_HANDLE_VALUE; // If the FindFirstChangeNotification function fails, the return value is INVALID_HANDLE_VALUE.
UITab _waitTab = UITab_None;
std::wstring _path = L"";

Expand Down Expand Up @@ -225,6 +225,6 @@ struct SKIF_RegistryWatch {
} _init;

HKEY _hKeyBase = { };
HANDLE _hEvent = INVALID_HANDLE_VALUE;
HANDLE _hEvent = NULL; // If the CreateEvent function fails, the return value is NULL.
UITab _waitTab = UITab_None;
};
3 changes: 3 additions & 0 deletions src/utility/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3016,6 +3016,9 @@ SKIF_RegistryWatch::reset (void)
bool
SKIF_RegistryWatch::isSignaled (void)
{
if (_hEvent == NULL)
return false;

bool signaled =
WaitForSingleObjectEx (
_hEvent, 0UL, FALSE
Expand Down

0 comments on commit d59c81b

Please sign in to comment.