[Cogl] [PATCH 2/3] sdl: Use a 32-bit type to store the user event type number

Robert Bragg robert at sixbynine.org
Thu Jan 31 13:01:55 PST 2013


This looks good to land to me:

Reviewed-by: Robert Bragg <robert at linux.intel.com>

thanks,
- Robert

On Thu, Jan 31, 2013 at 4:53 PM, Neil Roberts <neil at linux.intel.com> wrote:
> In SDL1 the event type numbers were a single byte so there were only
> reserving a byte to store the application's chosen type in
> CoglRenderer. However in SDL2 they are a Uint32 and SDL_USEREVENT is
> 0x8000 so if the application was using that then Cogl would actually
> end up posting event type 0.
> ---
>  cogl/cogl-renderer-private.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cogl/cogl-renderer-private.h b/cogl/cogl-renderer-private.h
> index 2b5c836..8648374 100644
> --- a/cogl/cogl-renderer-private.h
> +++ b/cogl/cogl-renderer-private.h
> @@ -70,7 +70,7 @@ struct _CoglRenderer
>
>  #ifdef COGL_HAS_SDL_SUPPORT
>    CoglBool sdl_event_type_set;
> -  uint8_t sdl_event_type;
> +  uint32_t sdl_event_type;
>  #endif
>
>    /* List of callback functions that will be given every native event */
> --
> 1.7.11.3.g3c3efa5
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl


More information about the Cogl mailing list