sdl: Use a 32-bit type to store the user event type number

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.

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

(cherry picked from commit 39c9177776ac601a92c6f4112558464af6968ea0)
This commit is contained in:
Neil Roberts 2013-01-31 16:53:17 +00:00
parent b34034217a
commit f8108751a5

View File

@ -70,7 +70,7 @@ struct _CoglRenderer
#ifdef COGL_HAS_SDL_SUPPORT #ifdef COGL_HAS_SDL_SUPPORT
CoglBool sdl_event_type_set; CoglBool sdl_event_type_set;
uint8_t sdl_event_type; uint32_t sdl_event_type;
#endif #endif
/* List of callback functions that will be given every native event */ /* List of callback functions that will be given every native event */