mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-24 05:31:51 +01:00
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:
parent
28102b405b
commit
d2335274ee
8 changed files with 67 additions and 18 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue