using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using Valve.VR; namespace VDash { /// /// Interaction logic for MainWindow.xaml /// public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); //Connect to VR runtime... EVRInitError initError = EVRInitError.None; var ret = OpenVR.Init(ref initError, EVRApplicationType.VRApplication_Overlay); if (initError != EVRInitError.None) { throw new Exception($"Error connecting to VR: {initError.ToString()}"); } Overlay.WindowOverlay overlay = new Overlay.WindowOverlay("TestKey", "Window Dash"); overlay.Create(); //var screenStateLogger = new ScreenStateLogger(); //screenStateLogger.ScreenRefreshed += (sender, data) => //{ // Console.WriteLine("Got screen data!"); //}; //screenStateLogger.Start(); } } }