Skip to content

Commit 9e23c74

Browse files
committed
feat: add option to set game window title
This option would set window title for game detection, which is useful for CN client which title is "最终幻想XIV".
1 parent 6541095 commit 9e23c74

File tree

4 files changed

+30
-1
lines changed

4 files changed

+30
-1
lines changed

FFXIVMonReborn/MachinaCaptureWorker.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,13 @@ public void Run()
144144

145145
// GamePath points to sqpack
146146
monitor.OodlePath = GetOodlePath();
147-
147+
148+
// Set game window name for CN/KO client.
149+
if (!string.IsNullOrWhiteSpace(Settings.Default.GameWindowName))
150+
{
151+
monitor.WindowName = Settings.Default.GameWindowName;
152+
}
153+
148154
monitor.Start();
149155

150156
while (!_shouldStop)

FFXIVMonReborn/Properties/Settings.Designer.cs

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

FFXIVMonReborn/Views/MainWindow.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
<Separator></Separator>
7878
<MenuItem Header="_Set Repository" Click="SetRepository"/>
7979
<MenuItem Header="_Set Game Path" Click="SetGamePath"/>
80+
<MenuItem Header="_Set Game Window Name" Click="SetGameWindowName"/>
8081
<Separator></Separator>
8182
<MenuItem x:Name="SwitchModeSockets" Header="_Capture mode: Sockets" Click="SwitchModeSockets_OnClick"/>
8283
<MenuItem x:Name="SwitchModePcap" Header="_Capture mode: WinPCap" Click="SwitchModePcap_OnClick"/>

FFXIVMonReborn/Views/MainWindow.xaml.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,13 @@ public void SetGamePath(object sender, RoutedEventArgs e)
560560
MessageBoxImage.Asterisk);
561561
}
562562

563+
public void SetGameWindowName(object sender, RoutedEventArgs e)
564+
{
565+
string name = Interaction.InputBox("Enter the window name of the game.\nYou should restart capture after change.", "FFXIVMon Reborn", Properties.Settings.Default.GameWindowName);
566+
Properties.Settings.Default.GameWindowName = name;
567+
Properties.Settings.Default.Save();
568+
}
569+
563570
private void LoadFFXIVReplayRelay(object sender, RoutedEventArgs e)
564571
{
565572
((XivMonTab)MainTabControl.SelectedContent).LoadFfxivReplay();

0 commit comments

Comments
 (0)