aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-07-21 00:53:03 +0200
committerMattias Andrée <maandree@kth.se>2016-07-21 00:53:03 +0200
commit4a939c9813554298676adbc32b91465cfadcd030 (patch)
treeb87b3163d27c8893a5a5691921746d1c12f7c2f4
parentm ref (diff)
downloadlibcoopgamma-4a939c9813554298676adbc32b91465cfadcd030.tar.gz
libcoopgamma-4a939c9813554298676adbc32b91465cfadcd030.tar.bz2
libcoopgamma-4a939c9813554298676adbc32b91465cfadcd030.tar.xz
m api fix
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--src/libcoopgamma.c13
-rw-r--r--src/libcoopgamma.h7
2 files changed, 8 insertions, 12 deletions
diff --git a/src/libcoopgamma.c b/src/libcoopgamma.c
index 17f7f9c..c6459f4 100644
--- a/src/libcoopgamma.c
+++ b/src/libcoopgamma.c
@@ -2326,13 +2326,12 @@ int libcoopgamma_get_gamma_sync(const libcoopgamma_filter_query_t* restrict quer
* Cannot be used before connecting to the server
*
* @param filter The filter to apply, update, or remove, gamma ramp meta-data must match the CRTC's
- * @param depth The datatype for the stops in the gamma ramps, must match the CRTC's
* @param ctx The state of the library, must be connected
* @param async Information about the request, that is needed to
* identify and parse the response, is stored here
* @return Zero on success, -1 on error
*/
-int libcoopgamma_set_gamma_send(const libcoopgamma_filter_t* restrict filter, libcoopgamma_depth_t depth,
+int libcoopgamma_set_gamma_send(const libcoopgamma_filter_t* restrict filter,
libcoopgamma_context_t* restrict ctx,
libcoopgamma_async_context_t* restrict async)
{
@@ -2366,17 +2365,17 @@ int libcoopgamma_set_gamma_send(const libcoopgamma_filter_t* restrict filter, li
goto fail;
}
- switch (depth)
+ switch (filter->depth)
{
case LIBCOOPGAMMA_FLOAT: stopwidth = sizeof(float); break;
case LIBCOOPGAMMA_DOUBLE: stopwidth = sizeof(double); break;
default: INTEGRAL_DEPTHS
- if ((depth <= 0) || ((depth & 7) != 0))
+ if ((filter->depth <= 0) || ((filter->depth & 7) != 0))
{
errno = EINVAL;
goto fail;
}
- stopwidth = (size_t)(depth / 8);
+ stopwidth = (size_t)(filter->depth / 8);
break;
}
@@ -2452,10 +2451,10 @@ int libcoopgamma_set_gamma_recv(libcoopgamma_context_t* restrict ctx,
* @return Zero on success, -1 on error, in which case `ctx->error`
* (rather than `errno`) is read for information about the error
*/
-int libcoopgamma_set_gamma_sync(const libcoopgamma_filter_t* restrict filter, libcoopgamma_depth_t depth,
+int libcoopgamma_set_gamma_sync(const libcoopgamma_filter_t* restrict filter,
libcoopgamma_context_t* restrict ctx)
{
- SYNC_CALL(libcoopgamma_set_gamma_send(filter, depth, ctx, &async),
+ SYNC_CALL(libcoopgamma_set_gamma_send(filter, ctx, &async),
libcoopgamma_set_gamma_recv(ctx, &async), -1);
}
diff --git a/src/libcoopgamma.h b/src/libcoopgamma.h
index de188de..657592b 100644
--- a/src/libcoopgamma.h
+++ b/src/libcoopgamma.h
@@ -1512,14 +1512,13 @@ int libcoopgamma_get_gamma_sync(const libcoopgamma_filter_query_t* restrict,
* Cannot be used before connecting to the server
*
* @param filter The filter to apply, update, or remove, gamma ramp meta-data must match the CRTC's
- * @param depth The datatype for the stops in the gamma ramps, must match the CRTC's
* @param ctx The state of the library, must be connected
* @param async Information about the request, that is needed to
* identify and parse the response, is stored here
* @return Zero on success, -1 on error
*/
LIBCOOPGAMMA_GCC_ONLY(__attribute__((__nonnull__)))
-int libcoopgamma_set_gamma_send(const libcoopgamma_filter_t* restrict, libcoopgamma_depth_t,
+int libcoopgamma_set_gamma_send(const libcoopgamma_filter_t* restrict,
libcoopgamma_context_t* restrict, libcoopgamma_async_context_t* restrict);
/**
@@ -1544,14 +1543,12 @@ int libcoopgamma_set_gamma_recv(libcoopgamma_context_t* restrict, libcoopgamma_a
* operation without disconnection from the server
*
* @param filter The filter to apply, update, or remove, gamma ramp meta-data must match the CRTC's
- * @param depth The datatype for the stops in the gamma ramps, must match the CRTC's
* @param ctx The state of the library, must be connected
* @return Zero on success, -1 on error, in which case `ctx->error`
* (rather than `errno`) is read for information about the error
*/
LIBCOOPGAMMA_GCC_ONLY(__attribute__((__nonnull__)))
-int libcoopgamma_set_gamma_sync(const libcoopgamma_filter_t* restrict, libcoopgamma_depth_t,
- libcoopgamma_context_t* restrict);
+int libcoopgamma_set_gamma_sync(const libcoopgamma_filter_t* restrict, libcoopgamma_context_t* restrict);