[Scummvm-devel] Adding OSystem::getMouseState ?

Max Horn max at quendi.de
Sat Feb 10 11:58:12 CET 2007


Hi,

do any porters have objections to adding a mandatory  
OSystem::getMouseState method, which can be used by client code to  
detect which mouse buttons are currently pressed (by returning a  
bitmask) ? Rational: Right now it's possible for client code to  
"miss" mouse up events, e.g. because they might be using several  
event loops (and then there is the GUI which has it's own separate  
event loop, too). See in particular bug #1510038 <https:// 
sourceforge.net/tracker/? 
func=detail&atid=418820&aid=1510038&group_id=37116>.

An alternative way to approach this would be to finally implement the  
"event manager" which we would also need for "automatic" keyboard  
repeat control. It could keep track of these events and try to track  
the mouse state (and keyboard state) this way. But doing this  
requires that backends never "forget" to send any "up" events, of  
course.


Bye,
Max





More information about the Scummvm-devel mailing list