I was just starting a new game with pygame on python 3.6.5 on a Windows 10 PC, when I ended up with a really crazy glitch that I couldn't solve. This is my code, I'll explain my problem afterwards.
import pygame
pygame.init()
def create_window():
window = pygame.display.set_mode((800,600),pygame.HWSURFACE|pygame.DOUBLEBUF|pygame.FULLSCREEN)
create_window()
isRunning = True
while isRunning:
for event in pygame.event.get():
if event.type == pygame.KEYDOWN:
if event.type == K_a:
isRunning = False
pygame.quit()
So when I ran this code, pygame ran as normal, creating a fullscreen black window. Then a mouse appeared and when I pressed on the A key. When I did this, I couldn't exit the pygame window. I went onto Control+Alt+Delete task manager and it showed me the desktop. The graphics had gone a bit less realistic and the screen had zoomed in. The only way to get out was to go onto the task manager and end the python task. Then it went back to the normal desktop. I looked at another project : pygame fullscreen mode exit I tried that solution but it didn't work. I kept on trying to find the solution to the strange desktop but couldn't. I'd appreciate some help!