mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
Make OpenLink happen from the main thread
This commit is contained in:
parent
ebe184b10c
commit
2fbccb2e95
1 changed files with 10 additions and 1 deletions
|
|
@ -27,6 +27,8 @@ using Windows.Win32.System.Memory;
|
|||
using Windows.Win32.System.Ole;
|
||||
using Windows.Win32.UI.WindowsAndMessaging;
|
||||
|
||||
using Dalamud.Interface.Internal;
|
||||
|
||||
using FLASHWINFO = Windows.Win32.UI.WindowsAndMessaging.FLASHWINFO;
|
||||
using HWND = Windows.Win32.Foundation.HWND;
|
||||
using MEMORY_BASIC_INFORMATION = Windows.Win32.System.Memory.MEMORY_BASIC_INFORMATION;
|
||||
|
|
@ -530,7 +532,14 @@ public static partial class Util
|
|||
var process = new ProcessStartInfo(url)
|
||||
{
|
||||
UseShellExecute = true,
|
||||
ErrorDialogParentHandle = Service<InterfaceManager>.GetNullable() is { } im
|
||||
? im.GameWindowHandle
|
||||
: 0,
|
||||
Verb = "open",
|
||||
};
|
||||
if (Service<Framework>.GetNullable() is { } fw)
|
||||
_ = fw.RunOnFrameworkThread(() => Process.Start(process));
|
||||
else
|
||||
Process.Start(process);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue