# SetGamma patch coding questions

**URL:** <https://discourse.libsdl.org/t/setgamma-patch-coding-questions/6457>\
**Category:** SDL Development\
**Created:** [April 18, 2002, 8:10am UTC](https://discourse.libsdl.org/t/setgamma-patch-coding-questions/6457 "2002-04-18T08:10:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [April 18, 2002, 8:10am UTC](https://discourse.libsdl.org/t/setgamma-patch-coding-questions/6457/1 "2002-04-18T08:10:01Z")

</div>

> Hi Sam,  
> After doing some testing and getting a few other people to do some  
> testing using testgamma, we noticed that it leaves the screen in a red  
> hue after it finishes, thus requiring a reboot to reset the colours.

Fullscreen or windowed? Somebody else reported this too, but it works  
fine here… Is the gamma cleanup code not being called from the video  
driver quit function?

See ya,  
-Sam Lantinga, Software Engineer, Blizzard Entertainment

---

<div class="post-metadata">

**Author:** ![Dominique\_Louis](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/dominique_louis/32/95_2.png) [@Dominique\_Louis](https://discourse.libsdl.org/u/Dominique_Louis)\
**Post date:** [April 18, 2002, 10:38am UTC](https://discourse.libsdl.org/t/setgamma-patch-coding-questions/6457/2 "2002-04-18T10:38:01Z")

</div>

Hi Sam and David,  
Here are some more details…  
Windows XP  
1400x1050 32bit colour  
ATI Mobility M4 Graphics card ( it’s a Dell Laptop )  
SDL veriosn 1.2.4

In FullScreen mode it lightens and darkens until the image disappears  
then once I press escape it flashes to red ( which I assume is the  
correct behaviour ) and exits correctly. Display is as it was.

In Windowed mode when I press the up or down arrows it lightens and  
darkens the screen then when I press escape it flashes and leaves the  
whole desktop with a pinkish hue when it exits.

I can send an executable if anyone trusts and exe via email these days.

I hope this helps.

Dominique.

Sam Lantinga wrote:\>\>Hi Sam,

> > After doing some testing and getting a few other people to do some  
> > testing using testgamma, we noticed that it leaves the screen in a red  
> > hue after it finishes, thus requiring a reboot to reset the colours.
> 
> Fullscreen or windowed? Somebody else reported this too, but it works  
> fine here… Is the gamma cleanup code not being called from the video  
> driver quit function?
> 
> See ya,  
> -Sam Lantinga, Software Engineer, Blizzard Entertainment
> 
> * * *
> 
> SDL mailing list  
> SDL at [libsdl.org](http://libsdl.org)  
> [http://www.libsdl.org/mailman/listinfo/sdl](http://www.libsdl.org/mailman/listinfo/sdl)
