sdlayer2 behaved the opposite to winlayer and has been incorrect all
this time. The engine now exposes the option to use gamma adjustment or
the palette for brightness via a 'usegammabrightness' extern/osdvar.
* 0 means use palette shade offset brightness like DOS did
* 1 means apply a brightness curve in OpenGL fragment shaders
* 2 means change the system gamma ramp
The default is shader-based brightness, failing back to system gamma
and then palette.
Note also, setbrightness() can take a null palette if nothing should
change about the current palette except brightness.