SDL
SDL copied to clipboard
`SDL_EVENT_RENDER_*` events should probably tell which rendered it applies to
The events:
- SDL_EVENT_RENDER_TARGETS_RESET
- SDL_EVENT_RENDER_DEVICE_RESET
- SDL_EVENT_RENDER_DEVICE_LOST
don't have any data associated with them (except SDL_CommonEvent data).
Since these events apply to a renderer, and an application can create multiple renderers, the events should mention which renderer they apply to.
Can we stick a pointer into an event now? Everything else that isn't a const char * takes an instance ID...
/**
* Renderer event structure (event.render.*)
*
* \since This struct is available since SDL 3.1.7.
*/
typedef struct SDL_RenderEvent
{
SDL_EventType type; /**< SDL_EVENT_RENDER_TARGETS_RESET, SDL_EVENT_RENDER_DEVICE_RESET, SDL_EVENT_RENDER_DEVICE_LOST */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_Renderer *renderer; /**< the renderer added changing */
} SDL_RenderEvent;
No, we should use the associated window.