mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-10 15:25:42 -07:00
improve Watcher
ctor macro exclusions
This commit is contained in:
parent
d0f1b9de22
commit
49fd8eb2d2
@ -28,21 +28,21 @@ namespace Bloxstrap
|
||||
|
||||
string? watcherDataArg = App.LaunchSettings.WatcherFlag.Data;
|
||||
|
||||
#if DEBUG
|
||||
if (String.IsNullOrEmpty(watcherDataArg))
|
||||
{
|
||||
#if DEBUG
|
||||
string path = new RobloxPlayerData().ExecutablePath;
|
||||
using var gameClientProcess = Process.Start(path);
|
||||
|
||||
_watcherData = new() { ProcessId = gameClientProcess.Id };
|
||||
}
|
||||
#else
|
||||
if (String.IsNullOrEmpty(watcherDataArg))
|
||||
throw new Exception("Watcher data not specified");
|
||||
#endif
|
||||
|
||||
if (!String.IsNullOrEmpty(watcherDataArg))
|
||||
}
|
||||
else
|
||||
{
|
||||
_watcherData = JsonSerializer.Deserialize<WatcherData>(Encoding.UTF8.GetString(Convert.FromBase64String(watcherDataArg)));
|
||||
}
|
||||
|
||||
if (_watcherData is null)
|
||||
throw new Exception("Watcher data is invalid");
|
||||
|
Loading…
Reference in New Issue
Block a user