Constify gamma parameter to set_temperature() methods
This commit is contained in:
+1
-1
@@ -282,7 +282,7 @@ interpolate_color(float a, const float *c1, const float *c2, float *c)
|
||||
|
||||
void
|
||||
colorramp_fill(uint16_t *gamma_r, uint16_t *gamma_g, uint16_t *gamma_b,
|
||||
int size, int temp, float brightness, float gamma[3])
|
||||
int size, int temp, float brightness, const float gamma[3])
|
||||
{
|
||||
/* Approximate white point */
|
||||
float white_point[3];
|
||||
|
||||
+1
-1
@@ -23,6 +23,6 @@
|
||||
#include <stdint.h>
|
||||
|
||||
void colorramp_fill(uint16_t *gamma_r, uint16_t *gamma_g, uint16_t *gamma_b,
|
||||
int size, int temp, float brightness, float gamma[3]);
|
||||
int size, int temp, float brightness, const float gamma[3]);
|
||||
|
||||
#endif /* ! _REDSHIFT_COLORRAMP_H */
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ gamma_dummy_set_option(void *state, const char *key, const char *value)
|
||||
|
||||
int
|
||||
gamma_dummy_set_temperature(void *state, int temp, float brightness,
|
||||
float gamma[3])
|
||||
const float gamma[3])
|
||||
{
|
||||
printf(_("Temperature: %i\n"), temp);
|
||||
return 0;
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ int gamma_dummy_set_option(void *state, const char *key, const char *value);
|
||||
|
||||
void gamma_dummy_restore(void *state);
|
||||
int gamma_dummy_set_temperature(void *state, int temp, float brightness,
|
||||
float gamma[3]);
|
||||
const float gamma[3]);
|
||||
|
||||
|
||||
#endif /* ! _REDSHIFT_GAMMA_DUMMY_H */
|
||||
|
||||
+2
-2
@@ -301,7 +301,7 @@ randr_set_option(randr_state_t *state, const char *key, const char *value)
|
||||
|
||||
static int
|
||||
randr_set_temperature_for_crtc(randr_state_t *state, int crtc_num, int temp,
|
||||
float brightness, float gamma[3])
|
||||
float brightness, const float gamma[3])
|
||||
{
|
||||
xcb_generic_error_t *error;
|
||||
|
||||
@@ -356,7 +356,7 @@ randr_set_temperature_for_crtc(randr_state_t *state, int crtc_num, int temp,
|
||||
|
||||
int
|
||||
randr_set_temperature(randr_state_t *state, int temp, float brightness,
|
||||
float gamma[3])
|
||||
const float gamma[3])
|
||||
{
|
||||
int r;
|
||||
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ int randr_set_option(randr_state_t *state, const char *key, const char *value);
|
||||
|
||||
void randr_restore(randr_state_t *state);
|
||||
int randr_set_temperature(randr_state_t *state, int temp, float brightness,
|
||||
float gamma[3]);
|
||||
const float gamma[3]);
|
||||
|
||||
|
||||
#endif /* ! _REDSHIFT_GAMMA_RANDR_H */
|
||||
|
||||
+1
-1
@@ -170,7 +170,7 @@ vidmode_restore(vidmode_state_t *state)
|
||||
|
||||
int
|
||||
vidmode_set_temperature(vidmode_state_t *state, int temp, float brightness,
|
||||
float gamma[3])
|
||||
const float gamma[3])
|
||||
{
|
||||
int r;
|
||||
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ int vidmode_set_option(vidmode_state_t *state, const char *key,
|
||||
|
||||
void vidmode_restore(vidmode_state_t *state);
|
||||
int vidmode_set_temperature(vidmode_state_t *state, int temp, float brightness,
|
||||
float gamma[3]);
|
||||
const float gamma[3]);
|
||||
|
||||
|
||||
#endif /* ! _REDSHIFT_GAMMA_VIDMODE_H */
|
||||
|
||||
+1
-1
@@ -130,7 +130,7 @@ w32gdi_restore(w32gdi_state_t *state)
|
||||
|
||||
int
|
||||
w32gdi_set_temperature(w32gdi_state_t *state, int temp, float brightness,
|
||||
float gamma[3])
|
||||
const float gamma[3])
|
||||
{
|
||||
BOOL r;
|
||||
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ int w32gdi_set_option(w32gdi_state_t *state, const char *key,
|
||||
|
||||
void w32gdi_restore(w32gdi_state_t *state);
|
||||
int w32gdi_set_temperature(w32gdi_state_t *state, int temp, float brightness,
|
||||
float gamma[3]);
|
||||
const float gamma[3]);
|
||||
|
||||
|
||||
#endif /* ! _REDSHIFT_GAMMA_W32GDI_H */
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ typedef int gamma_method_set_option_func(void *state, const char *key,
|
||||
typedef void gamma_method_restore_func(void *state);
|
||||
typedef int gamma_method_set_temperature_func(void *state, int temp,
|
||||
float brightness,
|
||||
float gamma[3]);
|
||||
const float gamma[3]);
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
|
||||
Reference in New Issue
Block a user