Pygame error: display surface quit: Why?

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

Can anyone tell me why my app quits with:

pygame error: display Surface quit.

相关标签:
8条回答
  • 2020-12-04 02:37

    From http://archives.seul.org/pygame/users/Nov-2006/msg00236.html :

    On Thu, 2006-11-30 at 21:27 -0300, Nicolas Bischof wrote:

    pygame.error: display Surface quit what does that mean?, i can't fix it

    This means a call was made to pygame.display.quit() or pygame.quit(). If you try to do anything to the display surface after quit you will get this error.

    0 讨论(0)
  • 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))
    
    0 讨论(0)
提交回复
热议问题