|Reported by:||bluegr||Owned by:|
This is a patch that adds gamma support and a gamma slider to ScummVM's options (part of feature request #2116244). It does this by calling SDL_SetGamma, so it's done in hardware level, and it doesn't affect any engine
It's working, though there are still some unfinished things: - The gamma value is not set yet when ScummVM is loaded - Currently, the gamma values range from 0-200 (or 0.0 to 2.0). I'm not sure about the actual maximum value, though 2.0 seems to be very bright - When the options dialog pops up, the initial value of the slider is not set correctly - I'm not sure if the graphics tab is a good place to put the slider, as it contains per-game options. Perhaps the misc tab would be more appropriate? - I haven't documented functions setGamma() and resetGamma() in system.h - SDL_SetGamma() accepts a float, which is what setGamma() accepts. I'm not sure if there should be any floats in system.h, in case it's used by systems where floats are not supported (one of the reasons I haven't documented the function). Perhaps it would be wiser to change the float parameter to an integer (which would be the current parameter multiplied by 100)
Also, note that the XML theme files contain the save/load buttons from the common load dialog patch, which are not needed in this patch, I just haven't removed them (and I was hesitant to edit the actual patch file itself, in case I break it)
Ticket imported from: #2201951. Ticket imported from: patches/1037.