Size: 909
Comment: minor change
|
Size: 1247
Comment: sets display brightness, not window brightness. gamma multplier, not gamma.
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
Use this function to set the brightness (gamma correction) for a window. | Use this function to set the brightness (gamma multiplier) for the display that owns a given window. |
Line 16: | Line 16: |
||'''window'''||the window to change|| ||'''brightness'''||the brightness (gamma) value to set where 0.0 is completely dark and 1.0 is normal brightness|| |
||'''window'''||the window used to select the display whose brightness will be changed|| ||'''brightness'''||the brightness (gamma multiplier) value to set where 0.0 is completely dark and 1.0 is normal brightness|| |
Line 28: | Line 28: |
''You can add useful comments here'' | Despite the name and signature, this method sets the brightness of the entire display, not an individual window. A window is considered to be owned by the display that contains the window's center pixel. (The index of this display can be retrieved using [[SDL_GetWindowDisplayIndex]].) |
SDL_SetWindowBrightness
Use this function to set the brightness (gamma multiplier) for the display that owns a given window.
Contents
Syntax
int SDL_SetWindowBrightness(SDL_Window* window,
float brightness)
Function Parameters
window |
the window used to select the display whose brightness will be changed |
brightness |
the brightness (gamma multiplier) value to set where 0.0 is completely dark and 1.0 is normal brightness |
Return Value
Returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.
Code Examples
You can add your code example here
Remarks
Despite the name and signature, this method sets the brightness of the entire display, not an individual window. A window is considered to be owned by the display that contains the window's center pixel. (The index of this display can be retrieved using SDL_GetWindowDisplayIndex.)