Skip to content

Commit

Permalink
fix: unpass fullscreen argument
Browse files Browse the repository at this point in the history
  • Loading branch information
u8slvn committed Aug 30, 2024
1 parent 3498592 commit cbeb7bc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/doggo/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def run() -> None:
Initialize the pygame and start the world.
"""
# Check if the app should run in fullscreen mode.
# Fu
fullscreen = os.getenv("DOGGO_FULLSCREEN", "False").lower() in ("1", "true")

pg.init()
Expand Down
3 changes: 2 additions & 1 deletion src/doggo/world.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ def __init__(
size=size,
borderless=True,
always_on_top=True,
fullscreen=fullscreen,
)
self.window_surf: pg.Surface = self.window.get_surface()
self.screen: pg.Surface = pg.Surface(size=size)
self.window.set_icon(pg.image.load(icon).convert_alpha())
self.draggable: DraggableWindow = DraggableWindow(window=self.window)
self.fullscreen: bool = False
self.fullscreen: bool = fullscreen
self.fps: int = fps
self.clock: pg.time.Clock = pg.time.Clock()
self.running: bool = False
Expand Down
4 changes: 2 additions & 2 deletions tests/test_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def test_world_screen_is_scaled_regarding_fullscreen(fullscreen):
screen = world.get_screen()

if fullscreen:
assert screen.get_size() == (340, 106)
else:
assert screen.get_size() == world.window_surf.get_size()
else:
assert screen.get_size() == (340, 106)


def test_world_get_dt():
Expand Down

0 comments on commit cbeb7bc

Please sign in to comment.