Closed VladislavAntonyuk closed 1 year ago
Oh does that one work?! What I had should work but throws an exception... yeah if this works, let's do it! Thanks!
yes, I created that small utility to change screen brightness depending on battery status. I will create PR soon!
unfortunately, my code doesn't work with WinUI. I also get the exception. Unable to load winutill.dll.
That's too bad! Thank you for looking into it. Yeah I'll have to figure out if something is wrong or if this is simply not supported for WinUI at this time.
I think it's less relevant than for iOS and Android anyway but still good to have if we can :)
Sorry @jfversluis , It works. I initially tried on mac on VM. Works on Windows laptop
https://github.com/jfversluis/Plugin.Maui.ScreenBrightness/blob/bbb09f291a4f4fff19249b9510a2ca4107fb7810/src/Plugin.Maui.ScreenBrightness/ScreenBrightness.windows.cs#L6
Possible Windows implementation: https://github.com/VladislavAntonyuk/ScreenBrightnessService/blob/main/ScreenBrightnessService/BrightnessService/BrightnessService.cs
However it requires these nuget packages:
If we can use them, I can copy the changes to this library. @jfversluis what do you think?