mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Fix inconsistent handling of desktop app closing
This commit is contained in:
parent
9e311e69c9
commit
ec418261ea
@ -134,6 +134,14 @@
|
|||||||
else if (_logEntriesRead % 100 == 0)
|
else if (_logEntriesRead % 100 == 0)
|
||||||
App.Logger.WriteLine(LOG_IDENT, $"Read {_logEntriesRead} log entries");
|
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 (!ActivityInGame && ActivityPlaceId == 0)
|
||||||
{
|
{
|
||||||
if (entry.Contains(GameJoiningPrivateServerEntry))
|
if (entry.Contains(GameJoiningPrivateServerEntry))
|
||||||
@ -209,13 +217,7 @@
|
|||||||
}
|
}
|
||||||
else if (ActivityInGame && ActivityPlaceId != 0)
|
else if (ActivityInGame && ActivityPlaceId != 0)
|
||||||
{
|
{
|
||||||
if (App.Settings.Prop.UseDisableAppPatch && entry.Contains(GameLeavingEntry))
|
if (entry.Contains(GameDisconnectedEntry))
|
||||||
{
|
|
||||||
App.Logger.WriteLine(LOG_IDENT, "Received desktop app exit, closing Roblox");
|
|
||||||
using var process = Process.GetProcessById(_gameClientPid);
|
|
||||||
process.CloseMainWindow();
|
|
||||||
}
|
|
||||||
else if (entry.Contains(GameDisconnectedEntry))
|
|
||||||
{
|
{
|
||||||
App.Logger.WriteLine(LOG_IDENT, $"Disconnected from Game ({ActivityPlaceId}/{ActivityJobId}/{ActivityMachineAddress})");
|
App.Logger.WriteLine(LOG_IDENT, $"Disconnected from Game ({ActivityPlaceId}/{ActivityJobId}/{ActivityMachineAddress})");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user