I'm running this little program that loads images to the screen in fullscreen mode but once it loads the program will not exit by any key combination and I end up having to reset the computer to complete whatever else I was doing.
import pygame
pygame.init()
WIDTH=1366; HEIGHT=768
screen = pygame.display.set_mode((WIDTH, HEIGHT), pygame.FULLSCREEN)
pygame.display.set_caption('Katso')
PENGUIN = pygame.image.load("assets/download.png")
MICKEY = pygame.image.load("assets/mickey.jpg")
ADV = pygame.image.load("assets/adv.jpg")
CAT = pygame.image.load("assets/cat.jpg")
FLV = pygame.image.load("assets/flavours.jpg")
HALL = pygame.image.load("assets/hallway.jpg")
x = 0; # x coordnate of image
y = 0; # y coordinate of image
screen.blit(PENGUIN,(x,y)); pygame.display.update()
running = True
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.QUIT()
if event.type == pygame.KEYDOWN and event.key == pygame.K_1:
screen.blit(MICKEY,(x,y)); pygame.display.update()
if event.type == pygame.KEYDOWN and event.key == pygame.K_2:
screen.blit(PENGUIN,(x,y)); pygame.display.update()
if event.type == pygame.KEYDOWN and event.key == pygame.K_3:
screen.blit(ADV,(x,y)); pygame.display.update()
if event.type == pygame.KEYDOWN and event.key == pygame.K_4:
screen.blit(FLV,(x,y)); pygame.display.update()
if event.type == pygame.KEYDOWN and event.key == pygame.K_5:
screen.blit(CAT,(x,y)); pygame.display.update()
if event.type == pygame.KEYDOWN and event.key == pygame.K_6:
screen.blit(HALL,(x,y));pygame.display.update()
pygame.QUIT()