[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] pygame standard mouse



Kamilche kirjoitti:
I find the standard mouse in pygame is slow when display is set to fullscreen. Anyway around this? Or, is
For simplicity, I throw all away except the first one. If you wanted to be more accurate, you should probably throw away all except the LAST movement. That way you're always guaranteed of being up to date.

i also discovered that technique a while back and have been very happy with the performance since, am just using the last event data. was gonna mention it here too but thought that the problem was different (the mouse sensitivity setting, not getting lagged by handling a load of old mousemotion events in vain which is what this solves)


mousemotions = pygame.event.get(MOUSEMOTION)
if mousemotions: #checks if the list is nonempty
   mousemotion = mousemotions[-1]

--Kamilche

~Toni