fixed game not rendering on hardware
This commit is contained in:
parent
8e9e96d1bb
commit
9b752bde21
@ -40,19 +40,19 @@ def game():
|
||||
|
||||
# The game is normally rendered at 80 pixels and upscaled from there. If changing displays, change the
|
||||
# screen_size to reflect what the resolution of the new display is.
|
||||
screen_size = 320
|
||||
if gpio_handler.ON_HARDWARE:
|
||||
print('ON HARDWARE')
|
||||
else:
|
||||
print('NOT ON HARDWARE')
|
||||
screen_size = 240
|
||||
pygame.mouse.set_visible(False)
|
||||
pygame.display.set_caption('Pocket Friends {0}'.format(pocket_friends.__version__))
|
||||
window = pygame.display.set_mode((screen_size, screen_size), pygame.FULLSCREEN)
|
||||
else:
|
||||
screen_size = 240*2
|
||||
window = pygame.display.set_mode((screen_size, screen_size))
|
||||
surface = surface_modules.get(starting_surface).Surface((game_res, game_res), resources_dir, game_fps)
|
||||
|
||||
# Add an icon to the pygame window.
|
||||
icon = pygame.image.load(resources_dir + '/icon/icon.png').convert_alpha()
|
||||
pygame.display.set_icon(icon)
|
||||
pygame.display.set_caption('Pocket Friends {0}'.format(pocket_friends.__version__))
|
||||
|
||||
# Default game state when the game first starts.
|
||||
running = True
|
||||
|
Loading…
Reference in New Issue
Block a user