Wouter01 / MediaMate-Releases

73 stars 0 forks source link

Maximum Brightness Limitation with BetterDisplay #11

Closed dudynets closed 5 months ago

dudynets commented 11 months ago

Describe the bug When using MediaMate along with BetterDisplay app (with XDR brightness feature turned on, which increases the maximum brightness of the display from 100% to 160%) the HUD does not allow to exceed the 100% limit.

Expected behavior The expected behavior would be to allow to increase the brightness of the display beyond the 100% limit, as it is possible to do without MediaMate app running.

Screenshots mediamate-feature-request

System Info

Additional context I believe the same happens when using Lunar, Vivid or any other app that allows to increase the maximum brightness of the display. However, I have not tested this.

Wouter01 commented 11 months ago

Hi,

You're right that this happens with other apps such as Lunar aswell. This happens because those apps manage the display brightness beyond 100% themselves, and MediaMate only reports what the system brightness is set to. To support this, MediaMate needs to be able to communicate with the other apps. I'm actively working on adding support for Lunar, but cannot give a timeframe yet of when that will be done

dudynets commented 10 months ago

Hi,

Thank you for your response and clarification regarding the issue. It's great to hear that you're actively working on improving the compatibility with other apps like Lunar. I wanted to let you know that in version 2.2 of MediaMate, I've noticed a positive change. When the brightness event controller is set to "system," the XDR brightness feature works seamlessly with third-party apps such as BetterDisplay.

While the HUD might not display when the brightness exceeds 100%, the fact that the XDR brightness is functional with these third-party apps is a step in the right direction.

Once again, thank you for your ongoing efforts in refining MediaMate's capabilities. Looking forward to the continued development and any further enhancements you bring to the app.

waydabber commented 6 months ago

Hi there - I plan to add this to BetterDisplay with the next update that focuses on integration stuff.

https://github.com/waydabber/BetterDisplay/issues/2143

This should make it possible to have the two apps work together so the HUD/OSD UI could be shown by MediaMate.

Wouter01 commented 6 months ago

Hi,

Thank you for the update! I've been following some of your progress recently, once it's released I'll try to integrate it as soon as possible.

waydabber commented 6 months ago

Hi there,

here is some info on how to use the integration feature if you wish to add support to MediaMate. I think it's super easy, simply add an observer to a system notification and receive a json which can be easily decoded. Provided a code sample as well.

https://github.com/waydabber/BetterDisplay/issues/2143#issuecomment-1863244131

I think it would be a nice collab to have this. If you add support, I'll alter the wording in the app so it is more obvious that the feature works with MediaMate and also add a link to MediaMate + a mention on the app's GitHub page and add it to the feature list.

If you need a build with the feature added for testing, let me know! If you need some changes in how the integration work, also let me know!

UPDATE: expanded the example implementation a bit so it is obvious how to get the osdNotification (struct).

Wouter01 commented 6 months ago

Hi, Thanks a lot for the update! Based on your explanation, it seems trivial to add this to MediaMate. Something that's not entirely clear to me is how XDR brightness would be represented in these notifications?

I'd really appreciate it if you could send me a build to be able to test & integrate this. Do you have a timeframe for when this feature would be released? I'm currently working on MediaMate V3, but could add BetterDisplay support in a separate update if it would be released soon.

waydabber commented 6 months ago

Sure, here is a build:

https://github.com/waydabber/BetterDisplay/releases/download/v2.0.0-pre-release/BetterDisplay-v2.2.0-b25353-pre.zip

If you start the app with a -v then this build will print out the json that is being sent for the notification.

/Applications/BetterDisplay.app/Contents/MacOS/BetterDisplay -v

You need to enable the OSD integration feature under Settings (gear icon) > Keyboard > External OSD app support

The XDR brightness is not separately represented by default as the app uses an unified scale which involves software dimming at the bottom end of the scale and XDR upscaling at the upper end of the scale by default (this is different from how Lunar works for example). You can however enable this setting:

Screenshot 2023-12-20 at 10 21 06

If this is enabled, the app puts a chevron down or up symbol inside the brightness OSD icon that indicates whether dimming or upscaling is occurring alongside hardware control. With the OSD notification this translates into having a both a normal brightness OSD icon indicated (osdNotification.systemIconID == 1) and a secondary chevron.up or chevron.down symbol indicated in osdNotification.customSymbol. But most users don't enable this feature I think (it's not enabled by default) and even with this the main scale is still unified.

Wouter01 commented 6 months ago

Thank you! I tried testing it out, but it looks like I need the pro version to enable the feature. Would it be possible to get a (temporary) license so I can integrate the feature?

waydabber commented 6 months ago

Sure, contact me on the app's discord forum for a coupon in a DM: https://discord.gg/aKe5yCWXSp

Wouter01 commented 5 months ago

A new version of BetterDisplay and MediaMate has been released which adds support for communication between both apps. This should fix the issue.

waydabber commented 5 months ago

Thanks @Wouter01 for the collaborating on this!