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

Re: [pygame] transform.scale() freezes mouse in fullscreen



Eric wrote:
The program scales some very large JPEGs (ie: 2018x1536) to fit your screen,
and I found that while doing this, the mouse freezes. Once the scaling is
finished, the mouse starts working again. This only occurs when the program
is running in fullscreen mode, in a window the mouse does not get 'frozen'
for some reason.

One more thing.. any chance of a filtered /anti-aliased version of
transform.scale in future versions? :)
Thanks for the help, pygame is a great library!
you can look at "transform.rotozoom" which does filtered scaling and rotation. you'll find it works a little differently than the other scale function, since it only takes a "multiplier" for the new image size.

as for the mouse freezing. in fullscreen mode SDL sometimes maintains control of the mouse cursor in software. in this situation you are seeing the mouse 'freeze'. probably the only way to do this is in a separate thread. the image load and scale can happen in a separate thread, then the interface will remain responsive to user input.