0

I was using pygame to make some stuff and was messing around with the 'full screen' bool and wanted to make a game that was full screen, and since it was a test code and I didn't have a way to exit the program I used task manager to get out of the window, and it worked fine the first time, but then I did it again and when I exited the window my whole computer's resolution had changed to 1152 x 864. When I go into windows settings and try to change it back to default, my screen goes black, and after a second it goes straight back into the same resolution and won't change it's resolution at all. I've restarted my computer, and shut it down and left it for half an hour or so and none of that's helped the issue. What do I do?

Edit: I decided to open a video game that runs in my computers resolutions, and when I opened it was actually fine, and when I tabbed out of the game and checked my resolution it was in the recommended resolution, and I was happy that it looked like the problem was solved, but when I closed the game or tabbed out a second time it went back into the other resolution. I read that pygame's full screen feature was meant to be used on a different graphics card or operating system, so I think I figured out the problem; pygame forced my computer into a different resolution and is sticking to that because the fullscreen feature was designed for a different operating system, or something alike, and now pygame is forcing MY operating system/ graphics into a different resolution. If I uninstall pygame that could possibly fix it, do you think it would?

1 Answers1

0

To fix your resolution problem I found this link. If you want your pygame window to be full screen then you can use the following code in your mainloop to exit pygame:

while carryOn:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                carryOn = False
            elif event.type == pygame.KEYDOWN:
                if event.key == pygame.K_p: #Pressing the 'p' Key will quit the game
                        carryOn = False

carryOn is my game's mainloop.

when carryOn is false (have this at the end of your code):

pygame.quit()
Thomas
  • 1,214
  • 4
  • 18
  • 45
  • When I go to advanced display settings there's no option to change the resolution, and there was nothing else I could find to help me. I'm not really concerned with Pygame anymore as my computer is unusable and I don't know what to do. Should I take it to the windows store, or maybe reinstall windows? I've tried lots of things now. –  Apr 22 '20 at 22:32
  • Ok I just did something; if someone could check the edit in the original post and confirm that would be awesome. I'm really worrying about my computer now. –  Apr 22 '20 at 22:47