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

Re: [pygame] screen not being refreshed



stuartw@kcbbs.gen.nz wrote:
I find I need to pygame.event.pump() under windows as well, should I not have to? if I want updates after a reveal without me redrawing, that is.
i'd say you should have to. the only reason i am guessing lee didn't have to with some window managers is some fancy caching by the graphics client.


This is a slight problem since I cannot currently get my mixture of pygame and wxpython to allow me to call pump, as it locks up randomly - I assume pygame and wxpython are fighting over windows messages and pygame looses.
Other than that it works great, and I can in my application live without the redraws (windows is rarely covered).
hmm, locking up in this case is probably not gonna be fixable. are you using multiple threads? if so definitely try to keep all the window action on one thread (or at least create some lock so only one thread plays with windows at a time)

i assume you are already using the 'windib' SDL display driver when your SDL/pygame window is embedded? if not definitely give that a shot.

instead of calling pygame.event.pump() you could probably just call pygame.display.update(). this will 'redraw' the entire window more frequently than it needs to, but also might not lock up. just call the full update once every second or two, then a 'dirtied' window will eventually get redrawn.