[Scummvm-devel] Backend features (was: RANT)
Torbjörn Andersson
eriktorbjorn at telia.com
Sun Jul 23 13:24:10 CEST 2006
Max Horn wrote:
> people just grumble into their beards, then
> implement something that "works good enough", cheat around the flaw,
> abuse the API
I wrote earlier that I didn't know of any case where a new backend
feature would be useful. Actually, I just realized that this is not
quite true.
In Beneath a Steel Sky, you can examine inventory objects by
left-clicking on them. The description will remain on screen until at
least 800 ms have passed, and the mouse button has been released. If you
click on it quickly enough, it's possible that the mouse button will
have been released before it has yet had the time to process the "mouse
down" event. In this case, fnLookAt() will never see the corresponding
"mouse up" event. It is, of course, simply to generate a new one -
simply click again - but it's still undesirable behaviour.
This is bug #1510038.
It should be possible to fix the problem by making sure that "mouse up"
events are tested every time the event queue is polled - not just in
waitMouseNotPressed(). Another possibility would be to add a function to
the backend to test the mouse state. In the SDL backend, I guess it
would be implemented by SDL_GetMouseState().
Question is, is this a good idea, or is the problem too specific to
warrant a new backend feature?
Torbjörn
More information about the Scummvm-devel
mailing list