mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-17 02:31:28 -07:00
Fix start event handler + launch menu title bar
turns out you need to call Reset() on the event even when you set its initial state to false
This commit is contained in:
parent
2791cb0b2e
commit
4d9a0ee410
@ -328,18 +328,25 @@ namespace Bloxstrap
|
||||
return;
|
||||
}
|
||||
|
||||
using var startEvent = new EventWaitHandle(false, EventResetMode.ManualReset, AppData.StartEvent);
|
||||
|
||||
// v2.2.0 - byfron will trip if we keep a process handle open for over a minute, so we're doing this now
|
||||
int gameClientPid;
|
||||
using (var gameClient = Process.Start(startInfo)!)
|
||||
bool startEventSignalled;
|
||||
|
||||
using (var startEvent = new EventWaitHandle(false, EventResetMode.ManualReset, AppData.StartEvent))
|
||||
{
|
||||
gameClientPid = gameClient.Id;
|
||||
startEvent.Reset();
|
||||
|
||||
// v2.2.0 - byfron will trip if we keep a process handle open for over a minute, so we're doing this now
|
||||
using (var process = Process.Start(startInfo)!)
|
||||
{
|
||||
gameClientPid = process.Id;
|
||||
}
|
||||
|
||||
App.Logger.WriteLine(LOG_IDENT, $"Started Roblox (PID {gameClientPid}), waiting for start event");
|
||||
|
||||
startEventSignalled = startEvent.WaitOne(TimeSpan.FromSeconds(10));
|
||||
}
|
||||
|
||||
App.Logger.WriteLine(LOG_IDENT, $"Started Roblox (PID {gameClientPid}), waiting for start event");
|
||||
|
||||
if (!startEvent.WaitOne(TimeSpan.FromSeconds(10)))
|
||||
if (!startEventSignalled)
|
||||
{
|
||||
Frontend.ShowPlayerErrorDialog();
|
||||
return;
|
||||
|
@ -24,7 +24,7 @@
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ui:TitleBar Grid.Row="0" Grid.ColumnSpan="2" Padding="8" ShowMinimize="False" ShowMaximize="False" CanMaximize="False" KeyboardNavigation.TabNavigation="None" />
|
||||
<ui:TitleBar Grid.Row="0" Grid.ColumnSpan="2" Padding="8" ShowMinimize="False" ShowMaximize="False" Title="Bloxstrap" Icon="pack://application:,,,/Bloxstrap.ico" CanMaximize="False" KeyboardNavigation.TabNavigation="None" />
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
Loading…
Reference in New Issue
Block a user