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

Neil Roberts neil at linux.intel.com
Thu Jan 31 08:53:17 PST 2013


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



More information about the Cogl mailing list