SDL icon indicating copy to clipboard operation
SDL copied to clipboard

SDL_SetWindowBrightness() doesn't work with Intel driver

Open SDLBugzilla opened this issue 4 years ago • 5 comments

This bug report was migrated from our old Bugzilla tracker.

Reported in version: 2.0.3 Reported for operating system, platform: Linux, All

Comments on the original bug report:

On 2015-02-24 10:56:53 +0000, wrote:

XStoreColors() doesn't work on Intel drivers (and maybe on some other open source drivers), but this works e.g. on nVidia proprietary drivers. I recommend to use XF86VidModeSetGamma() when XStoreColors() doesn't work. The second thing is that SDL doesn't check XStoreColors() return code - it should return the error value when XStoreColors() fail.

On 2017-08-13 03:35:48 +0000, Sam Lantinga wrote:

Can you provide a tested patch? I don't have a setup to test this here.

Thanks!

SDLBugzilla avatar Feb 10 '21 23:02 SDLBugzilla

This probably needs to see if XRandR has an equivalent instead of trying XVidMode (assuming drivers haven't improved and assuming we want to spend any effort on the brightness APIs).

icculus avatar Aug 11 '21 22:08 icculus

It looks like XRandR does support this: xrandr --output --gamma 0.5:1.0:1.0

slouken avatar Aug 12 '21 06:08 slouken

This still doesn't work with XStoreColors on this laptop's Intel GPU, but...do we want to wire this up to XRandR? I'm inclined to say this is something we should remove from SDL.

icculus avatar Aug 23 '22 02:08 icculus

Agreed, this doesn't look good on any platform. Changing the desktop colors is surprising and often uncomfortable for users. These days applications should use a shader ... should we provide that as part of the render API?

slouken avatar Aug 23 '22 02:08 slouken

should we provide that as part of the render API?

Yes, but not in SDL2. :)

icculus avatar Aug 23 '22 02:08 icculus

SetWindowBrightness & friends are removed now in SDL3, as of 52f4cc8.

slime73 avatar Nov 25 '22 21:11 slime73