1

I'm making a firework simulation in pygame, and I want to be able to run the program, and have it open up in full screen. Not the pygame.FULLSCREEN, I still want to be able to use pygame.QUIT.
I don't know if this is possible, but if anyone could help, please share your ideas!

Here's my code for the screen:

import pygame
screen = pygame.display.set_mode((0, 0), pygame.RESIZABLE)
Tonechas
  • 13,398
  • 16
  • 46
  • 80
  • What is the problem you're having? – DinosauRuss Jul 04 '17 at 20:04
  • Possible duplicate of [How to get the resolution of a monitor in Pygame?](https://stackoverflow.com/questions/19954469/how-to-get-the-resolution-of-a-monitor-in-pygame) – skrx Jul 05 '17 at 02:01

1 Answers1

3

You could use the width and height of the screen to setup the resolution, like in this post, by using the VideoInfo object provided by pygame:

import pygame

pygame.init()
video_infos = pygame.display.Info()
width, height = video_infos.current_w, video_infos.current_h
screen = pygame.display.set_mode((width, height), pygame.RESIZABLE)
# [...]
PRMoureu
  • 12,817
  • 6
  • 38
  • 48