Added check to close the launcher along with the game if the game was launched directly

This commit is contained in:
2025-06-22 17:56:08 +01:00
parent f324848c19
commit 77406db737

View File

@ -100,6 +100,10 @@ class Launcher:
self.currentGame = None self.currentGame = None
os.chdir(originalCWD) os.chdir(originalCWD)
pygame.display.set_caption('Pain Jam Launcher') pygame.display.set_caption('Pain Jam Launcher')
# If we launched directly into a game
if args.gameID != None:
# Exit the launcher when we exit the game
self.running = False
else: else:
if event.type == pygame.QUIT: if event.type == pygame.QUIT:
# Exit the launcher. # Exit the launcher.