diff --git a/Bloxstrap/Integrations/ActivityWatcher.cs b/Bloxstrap/Integrations/ActivityWatcher.cs index 19e11828..2e5d39d0 100644 --- a/Bloxstrap/Integrations/ActivityWatcher.cs +++ b/Bloxstrap/Integrations/ActivityWatcher.cs @@ -134,6 +134,14 @@ private void ExamineLogEntry(string entry) else if (_logEntriesRead % 100 == 0) App.Logger.WriteLine(LOG_IDENT, $"Read {_logEntriesRead} log entries"); + + if (App.Settings.Prop.UseDisableAppPatch && entry.Contains(GameLeavingEntry)) + { + App.Logger.WriteLine(LOG_IDENT, "Received desktop app exit, closing Roblox"); + using var process = Process.GetProcessById(_gameClientPid); + process.CloseMainWindow(); + } + if (!ActivityInGame && ActivityPlaceId == 0) { if (entry.Contains(GameJoiningPrivateServerEntry)) @@ -209,13 +217,7 @@ private void ExamineLogEntry(string entry) } else if (ActivityInGame && ActivityPlaceId != 0) { - if (App.Settings.Prop.UseDisableAppPatch && entry.Contains(GameLeavingEntry)) - { - App.Logger.WriteLine(LOG_IDENT, "Received desktop app exit, closing Roblox"); - using var process = Process.GetProcessById(_gameClientPid); - process.CloseMainWindow(); - } - else if (entry.Contains(GameDisconnectedEntry)) + if (entry.Contains(GameDisconnectedEntry)) { App.Logger.WriteLine(LOG_IDENT, $"Disconnected from Game ({ActivityPlaceId}/{ActivityJobId}/{ActivityMachineAddress})");