Skip to content

Commit d71ec3d

Browse files
committed
Update Machina for Oodle handling
1 parent 87a1787 commit d71ec3d

File tree

5 files changed

+22
-8
lines changed

5 files changed

+22
-8
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -351,4 +351,6 @@ MigrationBackup/
351351
# Ionide (cross platform F# VS Code tools) working folder
352352
.ionide/
353353

354-
/SDK/
354+
/SDK/
355+
356+
.idea/

UniversalisCommon/UniversalisCommon.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net48</TargetFramework>
5-
<Version>1.3.0.0</Version>
5+
<Version>1.3.1.0</Version>
66
<LangVersion>8.0</LangVersion>
77
<Company>Universalis</Company>
88
<Authors>Universalis</Authors>

UniversalisPlugin/UniversalisPlugin.csproj

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net48</TargetFramework>
5-
<Version>1.3.0.0</Version>
5+
<Version>1.3.1.0</Version>
66
<ApplicationIcon>dalamud_icon.ico</ApplicationIcon>
77
<Company>goatsoft</Company>
88
<Authors>Universalis</Authors>
@@ -23,8 +23,7 @@
2323

2424
<ItemGroup>
2525
<PackageReference Include="Costura.Fody" Version="4.1.0" />
26-
<PackageReference Include="Machina" Version="2.3.0.7" />
27-
<PackageReference Include="Machina.FFXIV" Version="2.3.2.4" />
26+
<PackageReference Include="Machina.FFXIV" Version="2.3.3.9" />
2827
</ItemGroup>
2928

3029
<ItemGroup>

UniversalisStandaloneUploader/UniversalisStandaloneUploader.csproj

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<OutputType>WinExe</OutputType>
55
<TargetFramework>net48</TargetFramework>
6-
<Version>1.3.0.0</Version>
6+
<Version>1.3.1.0</Version>
77
<LangVersion>9.0</LangVersion>
88
<ApplicationIcon>dalamud_icon.ico</ApplicationIcon>
99
<StartupObject>UniversalisStandaloneUploader.Program</StartupObject>
@@ -19,8 +19,7 @@
1919

2020
<ItemGroup>
2121
<PackageReference Include="Costura.Fody" Version="4.1.0" />
22-
<PackageReference Include="Machina" Version="2.3.0.7" />
23-
<PackageReference Include="Machina.FFXIV" Version="2.3.2.4" />
22+
<PackageReference Include="Machina.FFXIV" Version="2.3.3.9" />
2423
</ItemGroup>
2524

2625
<ItemGroup>

UniversalisStandaloneUploader/UploaderForm.cs

+14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using Machina.FFXIV;
22
using Machina.Infrastructure;
33
using System;
4+
using System.Diagnostics;
5+
using System.Runtime.InteropServices;
46
using System.Windows.Forms;
57
using UniversalisCommon;
68
using UniversalisStandaloneUploader.Properties;
@@ -146,6 +148,12 @@ private void InitializeNetworkMonitor()
146148

147149
if (winPCapCheckBox.Checked)
148150
_ffxivNetworkMonitor.MonitorType = NetworkMonitorType.WinPCap;
151+
152+
var window = FindWindow("FFXIVGAME", null);
153+
GetWindowThreadProcessId(window, out var pid);
154+
var proc = Process.GetProcessById(Convert.ToInt32(pid));
155+
var gamePath = proc.MainModule?.FileName;
156+
_ffxivNetworkMonitor.FFXIVDX11ExecutablePath = gamePath;
149157

150158
_ffxivNetworkMonitor.Start();
151159
}
@@ -186,5 +194,11 @@ private void WinPCapCheckBox_CheckedChanged(object sender, EventArgs e)
186194
Log($"[ERROR] Could not re-initialize network monitor:\n{ex}");
187195
}
188196
}
197+
198+
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
199+
private static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
200+
201+
[DllImport("user32.dll", SetLastError=true)]
202+
private static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId);
189203
}
190204
}

0 commit comments

Comments
 (0)