SDL
SDL copied to clipboard
SDL_SetWindowBrightness() doesn't work with Intel driver
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!
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).
It looks like XRandR does support this:
xrandr --output
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.
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?
should we provide that as part of the render API?
Yes, but not in SDL2. :)
SetWindowBrightness & friends are removed now in SDL3, as of 52f4cc8.