Skip to content

Commit

Permalink
Fix call to logger.warn
Browse files Browse the repository at this point in the history
  • Loading branch information
Baekalfen committed Jan 19, 2024
1 parent 2137be2 commit f6036a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyboy/plugins/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,11 +864,11 @@ def draw_text(self, x, y, text):
self.dst.y = y
for i, c in enumerate(text):
if not 0 <= c < 256:
logger.warn(f"Invalid character {c} in {bytes(text).decode('cp437')}") # This may error too...
logger.warning(f"Invalid character {c} in {bytes(text).decode('cp437')}") # This may error too...
c = 0
self.src.y = 16 * c
if self.dst.x > self.width - 8:
logger.warn(f"Text overrun while printing {bytes(text).decode('cp437')}")
logger.warning(f"Text overrun while printing {bytes(text).decode('cp437')}")
break
sdl2.SDL_RenderCopy(self._sdlrenderer, self.font_texture, self.src, self.dst)
self.dst.x += 8
Expand Down

0 comments on commit f6036a2

Please sign in to comment.