[Scummvm-devel] ATTN porters: updateScreen() OSystem method

Paul Gilbert paulfgilbert at gmail.com
Tue Apr 18 16:22:09 CEST 2006

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? That is, every time the
mouse moves it could just call updateScreen(), which would allow
responsive updates of the mouse cursor, freeing the engine to only
need to call it when it actually does some updates itself. It would
cuts down on CPU usage on battery powered devices, as the calls
wouldn't be made when there's no cursor movement or screen changes.

On 4/18/06, Marcus Comstedt <marcus at mc.pp.se> wrote:
> How to find the ideal interval would still be an open question
> though.  Modern CRTs often use refresh rates at 100Hz or over, so for
> maximum smoothness of cursor updates on such screens an interval of
> <10ms would be required.  OTOH, picking an interval which is too short
> would lead to unnecessary load on low end (battery-powered) devices...
> (Even if the backend decides that it is too soon to render, there
>  would still be the call, so the CPU needs to be revived from any
>  sleep/low-power state.)
>   // Marcus

More information about the Scummvm-devel mailing list