X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcec-config-gui%2Factions%2FConnectToDevice.cs;h=128223f94ec01a919b8f11f37b295bc1f300ef8b;hb=66609663d93f48b37fa79647e339ab48a70f73d8;hp=43d786eccf1df168f9751e447f539c0583e98882;hpb=6d866874c4acb7620caea7a4415357bbf56f1a62;p=deb_libcec.git diff --git a/src/cec-config-gui/actions/ConnectToDevice.cs b/src/cec-config-gui/actions/ConnectToDevice.cs index 43d786e..128223f 100644 --- a/src/cec-config-gui/actions/ConnectToDevice.cs +++ b/src/cec-config-gui/actions/ConnectToDevice.cs @@ -24,15 +24,19 @@ namespace CecConfigGui.actions Application.Exit(); } - SendEvent(UpdateEventType.StatusText, "Detecting TV vendor..."); SendEvent(UpdateEventType.ProgressBar, 20); + SendEvent(UpdateEventType.StatusText, "Sending power on commands..."); + Lib.PowerOnDevices(CecLogicalAddress.Broadcast); + + SendEvent(UpdateEventType.StatusText, "Detecting TV vendor..."); + SendEvent(UpdateEventType.ProgressBar, 30); SendEvent(UpdateEventType.TVVendorId, (int)Lib.GetDeviceVendorId(CecLogicalAddress.Tv)); SendEvent(UpdateEventType.StatusText, "Detecting menu language..."); - SendEvent(UpdateEventType.ProgressBar, 30); + SendEvent(UpdateEventType.ProgressBar, 40); SendEvent(UpdateEventType.MenuLanguage, Lib.GetDeviceMenuLanguage(CecLogicalAddress.Tv)); - SendEvent(UpdateEventType.ProgressBar, 40); + SendEvent(UpdateEventType.ProgressBar, 50); SendEvent(UpdateEventType.StatusText, "Detecting AVR devices..."); bool hasAVRDevice = Lib.IsActiveDevice(CecLogicalAddress.AudioSystem); @@ -40,25 +44,25 @@ namespace CecConfigGui.actions if (hasAVRDevice) { - SendEvent(UpdateEventType.ProgressBar, 50); + SendEvent(UpdateEventType.ProgressBar, 60); SendEvent(UpdateEventType.StatusText, "Detecting AVR vendor..."); SendEvent(UpdateEventType.AVRVendorId, (int)Lib.GetDeviceVendorId(CecLogicalAddress.AudioSystem)); } if (!Lib.GetDevicePowerStatus(CecLogicalAddress.Tv).Equals(CecPowerStatus.On)) { - SendEvent(UpdateEventType.ProgressBar, 60); + SendEvent(UpdateEventType.ProgressBar, 70); SendEvent(UpdateEventType.StatusText, "Activating the source..."); Lib.SetActiveSource(CecDeviceType.Reserved); } - SendEvent(UpdateEventType.ProgressBar, 70); + SendEvent(UpdateEventType.ProgressBar, 80); SendEvent(UpdateEventType.StatusText, "Reading device configuration..."); Lib.GetCurrentConfiguration(Config); SendEvent(Config); - SendEvent(UpdateEventType.ProgressBar, 80); + SendEvent(UpdateEventType.ProgressBar, 90); SendEvent(UpdateEventType.StatusText, "Polling active devices"); SendEvent(UpdateEventType.PollDevices);