0

I am testing brightnessoverride class for UWP on Raspiberry Pi. I am not sure if it supports Raspberry Pi with RaspberryPi official 7" touch screen LCD.

I am trying to setbrightnessvalue as follow;

            displayBrightness = BrightnessOverride.GetForCurrentView();
            displayBrightness.SetBrightnessLevel(0.50, DisplayBrightnessOverrideOptions.None);
            displayBrightness.StartOverride();

but I get an exception message as below

"Error HRESULT E_FAIL has been returned from a call to a COM component."

Can anyone help to explain? Thank you.

mylim
  • 313
  • 4
  • 16
  • 1
    Controlling brightness in software is a chronic problem, there are too many video drivers and monitors that don't support it. Monitors being the usual problem, the VESA standard is too weak. Closely followed by laptops that want to do this with an Fn-key. So you'll need to interpret this exception as "not supported". – Hans Passant Jun 07 '19 at 11:08
  • Hi @hanspassant I am using the raspberrypi 7" touch LCD. So I guess I won't be able to control the brightness. Thanks. – mylim Jun 07 '19 at 11:50

1 Answers1

0

BrightnessOverride API provides the ability to have per-application brightness control on devices that support controllable brightness.

To check if the device support it you can check BrightnessOverride.IsSupported. For Raspberry Pi with official 7" touch screen, this value is false.

Rita Han
  • 9,574
  • 1
  • 11
  • 24
  • Might be a good idea to shortcut this to the MSFT employee that wrote this code. Something as basic as E_NOTIMPL is far superior to E_FAIL. It is your job to pass on the pain and suffering that *many* programmer experience when trying to write UWP code. Fix that problem, it might actually be successful some day. – Hans Passant Jun 10 '19 at 02:42
  • We do help to collect user voice and customers can also submit their suggestions via [feedback hub](https://support.microsoft.com/en-sg/help/4021566/windows-10-send-feedback-to-microsoft-with-feedback-hub). – Rita Han Jun 10 '19 at 02:58
  • No, this is your job, not ours. Or just remove the MSFT letters from your user name, it makes a promise you can't keep. – Hans Passant Jun 10 '19 at 03:07