2 ms·
SDL can handle events and message passing just fine, but you would have to write most of that yourself either way, since it isn't a framework.
by krapp 5y ago
SDL can handle events and message passing just fine, but you would have to write most of that yourself either way, since it isn't a framework.
- jstimpfle 5y agoHow do you mean it "can handle events"? I barely know SDL, but it does not look like it is super straightforward to integrate a socket: https://github.com/libsdl-org/SDL/blob/main/src/video/windows/SDL_windowsevents.c#L1430 https://github.com/libsdl-org/SDL-1.2/blob/main/src/events/SDL_events.c#L403 https://github.com/SDL-mirror/SDL/blob/master/src/events/SDL_events.c#L769 Also, it seems to create a separate listener thread just to pump the messages, which I'm not sure I like. I could imagine SDL supports new event types by requiring the user to create _yet_ another thread, which waits for e.g. network events, then submits them to the SDL main event queue.