mirror of
https://github.com/moonlight-stream/Internet-Hosting-Tool.git
synced 2025-07-01 15:26:54 +00:00
Avoid extra GameStream state prints when the state isn't changing
This commit is contained in:
parent
021474cdd2
commit
8066cf4be1
@ -533,14 +533,8 @@ bool IsGameStreamEnabled()
|
|||||||
printf("RegQueryValueExA() failed: %d" NL, error);
|
printf("RegQueryValueExA() failed: %d" NL, error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (!enabled) {
|
|
||||||
printf("GameStream is OFF!" NL);
|
return enabled != 0;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
printf("GameStream is ON!" NL);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdatePortMappingsForTarget(bool enable, char* targetAddressIP4, char* internalAddressIP4, char* upstreamAddressIP4)
|
void UpdatePortMappingsForTarget(bool enable, char* targetAddressIP4, char* internalAddressIP4, char* upstreamAddressIP4)
|
||||||
@ -904,7 +898,17 @@ int Run(bool standaloneExe)
|
|||||||
for (;;) {
|
for (;;) {
|
||||||
ResetEvent(gsChangeEvent);
|
ResetEvent(gsChangeEvent);
|
||||||
ResetEvent(ifaceChangeEvent);
|
ResetEvent(ifaceChangeEvent);
|
||||||
UpdatePortMappings(IsGameStreamEnabled());
|
|
||||||
|
bool gameStreamEnabled = IsGameStreamEnabled();
|
||||||
|
|
||||||
|
if (gameStreamEnabled) {
|
||||||
|
printf("GameStream is ON!" NL);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
printf("GameStream is OFF!" NL);
|
||||||
|
}
|
||||||
|
|
||||||
|
UpdatePortMappings(gameStreamEnabled);
|
||||||
|
|
||||||
// Refresh when half the duration is expired or if an IP interface
|
// Refresh when half the duration is expired or if an IP interface
|
||||||
// change event occurs.
|
// change event occurs.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user