mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Merge pull request #682 from Soreepeong/feature/inject-via-entrypoint
Add DelayInitializeMs to DalamudStartInfo
This commit is contained in:
commit
681be5b743
3 changed files with 12 additions and 1 deletions
|
|
@ -198,7 +198,7 @@ HWND try_find_game_window() {
|
|||
DWORD pid;
|
||||
GetWindowThreadProcessId(hwnd, &pid);
|
||||
|
||||
if (pid == GetCurrentProcessId())
|
||||
if (pid == GetCurrentProcessId() && IsWindowVisible(hwnd))
|
||||
break;
|
||||
}
|
||||
return hwnd;
|
||||
|
|
|
|||
|
|
@ -51,5 +51,10 @@ namespace Dalamud
|
|||
/// Gets a value indicating whether or not market board information should be uploaded by default.
|
||||
/// </summary>
|
||||
public bool OptOutMbCollection { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value that specifies how much to wait before a new Dalamud session.
|
||||
/// </summary>
|
||||
public int DelayInitializeMs { get; init; } = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,6 +79,12 @@ namespace Dalamud
|
|||
|
||||
try
|
||||
{
|
||||
if (info.DelayInitializeMs > 0)
|
||||
{
|
||||
Log.Information(string.Format("Waiting for {0}ms before starting a session.", info.DelayInitializeMs));
|
||||
Thread.Sleep(info.DelayInitializeMs);
|
||||
}
|
||||
|
||||
Log.Information(new string('-', 80));
|
||||
Log.Information("Initializing a session..");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue