[Scummvm-devel] ATTN porters: updateScreen() OSystem method
Max Horn
max at quendi.de
Wed Apr 19 06:27:21 CEST 2006
Am 19.04.2006 um 01:21 schrieb Paul Gilbert:
> I may be missing something obvious, but if the backend is going to be
> responsible for keeping track of the time and only actually doing
> updates every X milliseconds, then couldn't the backend just call
> updateScreen() doing the event generation?
Not really. After all, an engine may not call OSystem::pollEvent for
an extended time period either. But the engine can't do anything if
it isn't given any computation time. So the engines must somehow give
the engine a chance to regularly spend some CPU time. Which means
some backend method must be called frequently (threads are not an
option, since some of our targets systems don't have them). And that
function shouldn't be pollEvent, because any even polled that way is
removed from the even code, so any code calling it must be prepared
to actually deal with the even, which may not be easily possible in
every spot where we'd call updateScreen...
Cheers,
Max
More information about the Scummvm-devel
mailing list