Commit 2f5dbd8f authored by Jonathan Carter's avatar Jonathan Carter
Browse files

Set correct resolution and screen type out of the box

parent 673f87f6
......@@ -9,27 +9,30 @@ import os
pygame.init()
pygame.font.init()
# Some initial variables
# TODO: Get from config file
SCREEN_WIDTH=1600
SCREEN_HEIGHT=900
SCREEN_WIDTH=1024
SCREEN_HEIGHT=768
size = width, height = SCREEN_WIDTH, SCREEN_HEIGHT
if os.environ['DISPLAY'] == "":
# Run full-screen if we're not under X
INITIAL_SCREEN_WIDTH=0
INITIAL_SCREEN_HEIGHT=0
else:
# Run in a window under X
INITIAL_SCREEN_WIDTH=1377
INITIAL_SCREEN_HEIGHT=768
size = width, height = INITIAL_SCREEN_WIDTH, INITIAL_SCREEN_HEIGHT
speed = [0, 0]
black = 0, 0, 0
grey = 40, 40, 40
# Set up window
pygame.display.set_caption('md5sumchecker')
# Set to pygame.FULLSCREEN for fullscreen
screen = pygame.display.set_mode((size), pygame.NOFRAME)
#screen = pygame.display.set_mode((size), pygame.FULLSCREEN)
if os.environ['DISPLAY'] == "":
screen = pygame.display.set_mode((size), pygame.FULLSCREEN)
else:
screen = pygame.display.set_mode((size), pygame.NOFRAME)
screen.fill(grey)
SCREEN_WIDTH, SCREEN_HEIGHT = pygame.display.get_surface().get_size()
# Load images
usbimg = pygame.image.load('usb.png')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment