using System;
using System.Collections.Generic;
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
IntPtr[] handles = BFS.Window.GetVisibleAndMinimizedWindowHandles();
foreach (IntPtr win in handles)
{
// Skip the newly created window
if (win == windowHandle)
continue;
// Get process ID for this window
uint pid = BFS.Application.GetAppIDByWindow(win);
// Get the filename for that process
string exe = BFS.Application.GetMainFileByAppID(pid);
if (exe != null && exe.ToLower().EndsWith("mpv.exe"))
{
// Close the old mpv window
BFS.Window.Close(win);
}
}
}
}