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

Re: [pygame] Surface lost errors





On 12/24/06, Pete Shinners <pete@xxxxxxxxxxxx> wrote:
On Sat, 2006-12-23 at 11:07 +0000, Stephen Parkes wrote:
> when using a hardware surface as a background image I started getting
> surface lost errors.  I wrapped the blit like this
>
> try:
>     scr.blit(bg,(0,0))
> except:
>    bg = load_bg()
>    scr.blit(bg,(0,0))

perhaps it is the display surface that is getting lost? Windows pretty
much sucks with hardware acceleration because it rampages through
anything on the video  Not sure if it is possible to lose the actual
display surface though.


ahhh, that's a good point.

I've switched back to software blits anyway  I only tried hardware because my old machine was struggling with framerate and I didn't want to prematurely optimise some maths bits but unless someone comes along and changes trigonometry it's not premature anyway ;)

When 1.8 is released I'll see if I can reproduce the error.

cheers guys.


--
Steve 'sparkes' Parkes - tshirts http://nerd.ws - code http://zx-81.com