コード例 #1
0
        private void Tick(Object source, ElapsedEventArgs e)
        {
            var currentWindow = User32.GetForegroundWindow();

            if (_currentWindow == currentWindow)
            {
                return;
            }

            _currentWindow = currentWindow;
            Logger.LogDebug("Foreground window changed");

            Thread.Sleep(500);  // Give Steam a second to set features

            foreach (var feature in Features.BigPictureFocusedFeatures)
            {
                _device.WriteFeatureReport(feature);
            }
        }