Monitor for name changes too to detect deletion of the NvStream subkey
This commit is contained in:
+1
-1
@@ -912,7 +912,7 @@ DWORD WINAPI GameStreamStateChangeThread(PVOID Context)
|
|||||||
|
|
||||||
// Notify the main thread when the GameStream state changes
|
// Notify the main thread when the GameStream state changes
|
||||||
bool lastGameStreamState = IsGameStreamEnabled();
|
bool lastGameStreamState = IsGameStreamEnabled();
|
||||||
while ((err = RegNotifyChangeKeyValue(key, true, REG_NOTIFY_CHANGE_LAST_SET, nullptr, false)) == ERROR_SUCCESS) {
|
while ((err = RegNotifyChangeKeyValue(key, true, REG_NOTIFY_CHANGE_NAME | REG_NOTIFY_CHANGE_LAST_SET, nullptr, false)) == ERROR_SUCCESS) {
|
||||||
bool currentGameStreamState = IsGameStreamEnabled();
|
bool currentGameStreamState = IsGameStreamEnabled();
|
||||||
if (lastGameStreamState != currentGameStreamState) {
|
if (lastGameStreamState != currentGameStreamState) {
|
||||||
SetEvent((HANDLE)Context);
|
SetEvent((HANDLE)Context);
|
||||||
|
|||||||
Reference in New Issue
Block a user