Skip to content

Commit

Permalink
fix: an error in data slicing causing failure when HDMI display is co…
Browse files Browse the repository at this point in the history
…nnected
  • Loading branch information
sassanh committed Sep 1, 2024
1 parent d6acb3d commit c89c0b5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Version 0.9.8

- fix: an error in data slicing causing failure when HDMI display is connected

## Version 0.9.7

- fix: slice the data in case it exceeds the size of the display
Expand Down
4 changes: 2 additions & 2 deletions headless_kivy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ def render_on_display(self: HeadlessWidget, *_: object) -> None:
except Empty:
last_thread = None

height = min(int(self.height), dp(config.height()) - self.y)
width = min(int(self.width), dp(config.width()) - self.x)
height = int(min(self.height, dp(config.height()) - self.y))
width = int(min(self.width, dp(config.width()) - self.x))

data = data.reshape(int(self.height), int(self.width), -1)
data = data[:height, :width, :]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "headless-kivy"
version = "0.9.7"
version = "0.9.8"
description = "Headless renderer for Kivy framework"
authors = ["Sassan Haradji <[email protected]>"]
license = "Apache-2.0"
Expand Down

0 comments on commit c89c0b5

Please sign in to comment.