feat: delay main thread continuation until GameFixes are applied

This is a temporary workaround until we have infrastructure to intercept winapi in C++
This commit is contained in:
goaaats 2022-05-27 14:11:38 +02:00
parent 28102b405b
commit d2335274ee
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
8 changed files with 67 additions and 18 deletions

View file

@ -1,12 +1,17 @@
#define BOOT_AGING
using System;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Numerics;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using CheapLoc;
using Dalamud.Configuration.Internal;
using Dalamud.Game.ClientState.Conditions;
@ -29,7 +34,6 @@ using ImGuiNET;
using ImGuiScene;
using PInvoke;
using Serilog.Events;
namespace Dalamud.Interface.Internal
{
/// <summary>
@ -350,10 +354,25 @@ namespace Dalamud.Interface.Internal
#endregion
private bool signaledBoot = false;
private void OnDraw()
{
this.frameCount++;
#if BOOT_AGING
if (this.frameCount > 500 && !this.signaledBoot)
{
this.signaledBoot = true;
Task.Run(async () =>
{
using var client = new HttpClient();
await client.PostAsync("http://localhost:1415/aging/success", new StringContent(string.Empty));
});
}
#endif
try
{
this.DrawHiddenDevMenuOpener();