Icons are not displayed properly with pygame
问题 The icon is not displayed, it's only displayed after closing for half a second: screen = pygame.display.set_mode((1600, 900)) pygame.display.set_caption(‘Elizabeth2’) icon = pygame.image.load('reindeer.png') pygame.display.set_icon(icon) 回答1: See pygame.display.set_icon(): [...] Some systems do not allow the window icon to change after it has been shown. This function can be called before pygame.display.set_mode() to create the icon before the display mode is set. Set the icon before pygame