Skip to content

Commit

Permalink
2021.512.1742 Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
guerro323 committed May 12, 2021
1 parent c619b5c commit 7fd35da
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 2021.512.1742
## Launcher
• FIX: CTRL+G is now working again to swap between client and launcher.
• FIX: Clients can now be relaunched again after it get closed.

# 2021.511.2300
## Launcher
+ Authentification with Discord.
Expand Down
2 changes: 2 additions & 0 deletions PataNext.Export.Desktop/BringIntegratedClientInFrontSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public override bool CanUpdate()
var val = !World.Mgr.Get<VisualHWND>().IsEmpty && !World.Mgr.Get<GameClient>().IsEmpty && base.CanUpdate();
if (!val)
{
EnableWindow(visualHwnd.Value, true);

timeBeforeEnablingMainWindow = Environment.TickCount + 500;
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,12 @@ protected override void OnUpdate()
FileName = client.ExecutablePath,
CreateNoWindow = true,
UseShellExecute = false,
RedirectStandardOutput = true
}
RedirectStandardOutput = true,
},

EnableRaisingEvents = true
};

process.Start();
process.WaitForInputIdle();

Expand All @@ -105,7 +108,14 @@ protected override void OnUpdate()
};
var clientEntity = World.Mgr.CreateEntity();
clientEntity.Set(gameClient);


process.Exited += (_, _) =>
{
Console.WriteLine("Dispose client");
if (clientEntity.IsAlive)
clientEntity.Dispose();
};

TaskRunUtility.StartUnwrap(async cc =>
{
logger.ZLogInformation("Tryin' to get MainWindowHandle");
Expand Down
4 changes: 2 additions & 2 deletions PataNext.Export.Desktop/PataNext.Export.Desktop.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<PackageVersion>2021.511.2300</PackageVersion>
<PackageVersion>2021.512.1742</PackageVersion>
<Title>PataNext</Title>
<Title>PataNext</Title>
<Authors>guerro</Authors>
<Description>Patapon-Like game.</Description>
<ApplicationIcon>game.ico</ApplicationIcon>
<ApplicationIcon>game.ico</ApplicationIcon>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyVersion>2021.511.2300</AssemblyVersion>
<AssemblyVersion>2021.512.1742</AssemblyVersion>
<AssemblyName>PataNext</AssemblyName>
<Product>PataNext</Product>
<PackageIconUrl>https://github.com/guerro323/patanext/blob/master/PataNext.Export.Desktop/game.ico</PackageIconUrl>
Expand Down
9 changes: 7 additions & 2 deletions PataNext.Export.Desktop/Visual/VisualGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,20 +233,25 @@ protected override void Update()
ShowIntegratedWindows = showIntegrated && begin.AddSeconds(2) < DateTime.Now
});

if (gameBootstrap.Global.World.Get<GameClient>().IsEmpty)
{
showIntegrated = true;
}

kb.Capture();

// TODO: fix issues with swapping
// - Sometimes the keyboard is stuck on one window
// - Sometimes it doesn't even want to swap (even though SWAP is being printed)
/*var listener = kb.EventListener as SharpDxInputSystem.KeyboardListenerSimple;
var listener = kb.EventListener as SharpDxInputSystem.KeyboardListenerSimple;
if (listener.ControlMap[KeyCode.Key_G].IsPressed && kb.IsShiftState(Keyboard.ShiftState.Ctrl))
{
showIntegrated = !showIntegrated;
Console.WriteLine("SWAP");
}

foreach (var c in listener.ControlMap)
c.Value.IsPressed = false;*/
c.Value.IsPressed = false;
}

protected override bool OnKeyDown(KeyDownEvent e)
Expand Down

0 comments on commit 7fd35da

Please sign in to comment.