Page MenuHome

Adding an active_events property to SCA_PythonKeyboard and SCA_PythonMouse
Closed, ArchivedPublicPATCH

Description

As the summary says, this patch adds a new event to both SCA_PythonKeyboard and SCA_PythonMouse. This property is similar to the events property that both have, but it only returns events which are not KX_NO_INPUTSTATUS. This moves the "no input" check from Python to C, which gave my input handling code a 2x speed up. Python sucks (performance-wise) with iterating lists and SCA_PythonKeyboard has close to 200 events (I think something like 177, but I don't know for sure).

Event Timeline

Mitchell Stokes (moguri) changed the task status from Unknown Status to Unknown Status.Jan 22 2012, 9:30 PM