using System;
using System.Drawing;
// The 'windowHandle' parameter will contain the window handle for the:
// - Active window when run by hotkey
// - Window Location target when run by a Window Location rule
// - TitleBar Button owner when run by a TitleBar Button
// - Jump List owner when run from a Taskbar Jump List
// - Currently focused window if none of these match
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
//sets the audio device to use (replace with the name of your audio device of choice)
BFS.Audio.SetDefaultPlaybackSounds("Headphones (2- High Definition Audio Device)");
//launches the game
BFS.Application.Start("C:\\Program Files (x86)\\Steam\\SteamApps\\common\\Orion Dino Beatdown\\Binaries\\Win32\\DinoHordeGame.exe", "");
//waits in case the game relaunches itself (happens with some Steam games)
BFS.General.Sleep(5000);
//waits for the game to exit
BFS.Application.WaitForExitByFile("*DinoHordeGame.exe", 0);
//set the audio device again (replace with the name of your audio device of choice)
BFS.Audio.SetDefaultPlaybackSounds("Speakers (2- High Definition Audio Device)");
}
}