Raffaello / sdl2-vga-terminal

SDL2 VGA Terminal
MIT License
6 stars 1 forks source link

[VgaTerminal] using SDL_AddEventWatch for busy status #138

Open Raffaello opened 4 years ago

Raffaello commented 4 years ago

for the _busy method, so it would be in a event-driven fashion for eg. no real big improvement, but could be nicer.

at the same time could be used when the cursor generates the event to trigger the rendering. but again, can be trigger directly in the timer routine, but would be blocking the timer routine. anyway...

.... could be better.. probably to be moved into 0.4.x

just consider it a little bit more before doing it.


if using an event with SDL would be "globally" available and not anymore encapsulated. Need to analyze the use case, if it make sense that the user can be intercepted that event or something...

need more looking into that method.

also it would be more coupled with SDL...

so it would trigger to have an EventQueue system interface or similar that is using SDL... in the case SDL will be considered as a implementation cross-os layer only later on.


Raffaello commented 4 years ago

this is post-pone as not clear use cases and mixing situation, not real benefit of using this kind of pub/sub in a self contained library....

still it is not clear to me if that event can be intercepted by the user or it will internally call the method when fired....

btw doc: https://wiki.libsdl.org/SDL_AddEventWatch

SDL_AddEventWatch - SDL Wiki'