Interrupt / systemshock

Shockolate - A minimalist and cross platform System Shock source port.
GNU General Public License v3.0
806 stars 65 forks source link

Handle gamma pref in SetSDLPalette() #254

Closed donnierussellii closed 5 years ago

donnierussellii commented 5 years ago

This fixes an old problem I've been having with a too-bright screen that can't be corrected with the gamma slider.

Let me explain:

Before my last graphics driver update, the brightness was correct in windowed mode, but far too bright when switching to fullscreen. The colors also seemed to be washed out.

On the latest graphics driver, the brightness is now always too high, windowed or fullscreen. Only disabling OpenGL (stopping SDL from actually using the OpenGL driver) gets it back to what I expect it should be.

The changes in this PR fix the problem for me, as well as enforce the gamma preference for all palette changes in the game.

Edit: Using look up table so no math is done for each palette change.