📜  for e in p.event.get(): pygame.error: video system not initialized - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:08.396000             🧑  作者: Mango

代码示例1
import pygame as p
import sys

p.init()
screen = p.display.set_mode((800, 800))

while True:
    for e in p.event.get():
        if e.type == p.QUIT:
            p.quit()
            sys.exit(1)