diff --git a/pocket_friends/game_files/game.py b/pocket_friends/game_files/game.py index eaad9d1..6bbf7da 100644 --- a/pocket_friends/game_files/game.py +++ b/pocket_friends/game_files/game.py @@ -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) + + screen_size = 240 + pygame.mouse.set_visible(False) + window = pygame.display.set_mode((screen_size, screen_size), pygame.FULLSCREEN) # 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() diff --git a/pocket_friends/game_files/io/gpio_handler.py b/pocket_friends/game_files/io/gpio_handler.py index 3432c84..c6433c8 100644 --- a/pocket_friends/game_files/io/gpio_handler.py +++ b/pocket_friends/game_files/io/gpio_handler.py @@ -5,15 +5,9 @@ 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: - import pocket_friends.game_files.io.fake_gpio as GPIO - ON_HARDWARE = False +#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 # Dictionary of all the buttons used and what their corresponding GPIO codes are BUTTONS = {