changed resolution to 240x240 fullscreen by default
This commit is contained in:
parent
526b51b754
commit
d932538b41
@ -40,15 +40,10 @@ 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.
|
||||
if gpio_handler.ON_HARDWARE:
|
||||
gpio_handler.setup()
|
||||
|
||||
screen_size = 240
|
||||
pygame.mouse.set_visible(False)
|
||||
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()
|
||||
@ -86,5 +81,4 @@ def main():
|
||||
"""
|
||||
game()
|
||||
|
||||
gpio_handler.teardown()
|
||||
pygame.quit()
|
||||
|
@ -5,13 +5,7 @@ import importlib.util
|
||||
# If the RPi.GPIO module is not found (aka the program is not running on a Pi), import the fake
|
||||
# GPIO module instead to prevent a crash.
|
||||
|
||||
ON_HARDWARE = None # Flag to tell other methods if the program is running on hardware or not
|
||||
|
||||
try:
|
||||
importlib.util.find_spec('RPi.GPIO')
|
||||
import RPi.GPIO as GPIO
|
||||
ON_HARDWARE = False
|
||||
except ImportError:
|
||||
#ON_HARDWARE = None # Flag to tell other methods if the program is running on hardware or not
|
||||
import pocket_friends.game_files.io.fake_gpio as GPIO
|
||||
ON_HARDWARE = False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user