Script::SetGamma
function · ui · primitive
- Address
0x4891f0· 132 bytes, up to0x489273- Signature
int __fastcall (lua_State *L)- Meaning
- Stores 1.0 minus its argument in the gamma option, or raises the usage error
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- ui/videoverbs#gamma
- Test
ui::luabind_488_set_gamma
Finding: Gamma in ui: the video option verbs
GetGamma() returns 1.0 minus the gamma option's number and SetGamma(v) stores 1.0 minus v as %f text, both with
fsubr against the double 1.0. With the default gamma 1.0 the slider value is 0. SetGamma raises
Usage: SetGamma(value) without a numeric argument and applies no clamp: v = 5 stores −4.000000. The change callback
0x4034d0 converts the new text and, only while DesktopGamma is 0, rebuilds and uploads the ramp at once through the
device slot at +0x34. DesktopGamma set to nonzero restores the desktop's ramp, and set to 0 re-applies gamma.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 6
- CVar::Lookup cvar
- CVar::Set cvar
- SStrPrintf storm
- lua_isnumber lua
- lua_tonumber lua
- luaL_error lua
Calls and jumps by a bare address, from tables/calls.tsv.