Pygame error: display surface quit: Why?

前端 未结 8 1493
孤独总比滥情好
孤独总比滥情好 2020-12-04 01:54

Can anyone tell me why my app quits with:

pygame error: display Surface quit.

8条回答
  •  爱一瞬间的悲伤
    2020-12-04 02:40

    I had this problem too, but got it from another origin.

    I had a class defined like this:

    class PauseMenu(pygame.Surface)
    

    i got the error when forgetting to initialize the pygame.Surface and trying to blit it, making pygame.screen crash and gave me this error.

    so i just added this obviously

    pygame.Surface.__init__(self, (width, height))
    

提交回复
热议问题