fullscreen check maxint

This commit is contained in:
Frank DeMarco 2018-11-19 02:24:10 -05:00
parent 4447b32f69
commit 38f053ce1c
1 changed files with 6 additions and 5 deletions

View File

@ -1,4 +1,5 @@
from os import environ
from sys import maxint
from pygame import display, image, mouse
from pygame.locals import *
@ -37,7 +38,7 @@ class Display(GameChild):
if self.fullscreen_requested():
# flags = -abs(FULLSCREEN)
full = True
self.set_screen(0x0, fs=full)
self.set_screen(RESIZABLE | NOFRAME, fs=full)
def fullscreen_requested(self):
return not self.check_command_line(self.windowed_flag) and \
@ -50,7 +51,6 @@ class Display(GameChild):
dimensions = display.get_surface().get_size()
else:
dimensions = self.get_configuration("display", "dimensions")
print fs, flags
if fs:
self.screen = display.set_mode(dimensions, flags | -0x80000000)
else:
@ -65,7 +65,6 @@ class Display(GameChild):
def set_icon(self):
if self.icon_path:
print self.icon_path
display.set_icon(image.load(self.icon_path).convert_alpha())
def set_mouse_visibility(self, visibility=None):
@ -86,8 +85,10 @@ class Display(GameChild):
flags = self.screen.get_flags()
if flags & 0x80000000:
full = False
flags ^= 0x80000000
print flags
if maxint >> 33:
flags ^= 0x80000000
else:
flags ^= -0x80000000
else:
full = True
self.set_screen(flags, fs=full)