Open DeanZhuo opened 1 month ago
Not that I know of, did you figure this one out?
I found some that said it only affects the main screen where the screen brightness could be set from the display setting. I was developing the app using a laptop, so it works. My target device is using an external monitor where I can only set the brightness from the monitor setting (not from the windows display setting).
It work great on laptop and android device, but for PC with external monitor I'm using:
[DllImport("dxva2.dll", EntryPoint = "SetMonitorBrightness")]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool SetMonitorBrightness(IntPtr handle, uint newBrightness);
and user32.dll to find the monitor.
I tried the Plugin and it works like magic on my laptop (win10, 10.0.19045), both on Debug and Release. But then when I deployed it to my target device (win11, 10.0.22631), the app crashed and I found this on AppCenter:
My implementation using two buttons:
Do I need some kind of additional permission?