diff options
| author | Freya Murphy <freya@freyacat.org> | 2025-10-16 11:33:32 -0400 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2025-10-16 11:33:32 -0400 |
| commit | a910d77cb361b31262bf7723659c011553c9190b (patch) | |
| tree | 60f6e91b28f4577b3d88692a32530229f6a9bebc /graphics | |
| parent | graphics: refactor DebugInfo => FrameInfo, with other minor changes (diff) | |
| download | DungeonCrawl-a910d77cb361b31262bf7723659c011553c9190b.tar.gz DungeonCrawl-a910d77cb361b31262bf7723659c011553c9190b.tar.bz2 DungeonCrawl-a910d77cb361b31262bf7723659c011553c9190b.zip | |
graphics: draw_fps should pull fps from info struct
Diffstat (limited to 'graphics')
| -rw-r--r-- | graphics/src/render.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/graphics/src/render.rs b/graphics/src/render.rs index 40b3e1f..add19ab 100644 --- a/graphics/src/render.rs +++ b/graphics/src/render.rs @@ -68,7 +68,7 @@ impl<'a> Renderer<'a> { #[cfg(feature = "debug")] // Draw fps (debug only) - self.draw_fps(self.info.fps); + self.draw_fps(); } /// Draw game over screen @@ -92,8 +92,8 @@ impl<'a> Renderer<'a> { } /// Draw FPS counter - pub fn draw_fps(&mut self, fps: u32) { - let fps_str = format!("{fps}"); + pub fn draw_fps(&mut self) { + let fps_str = format!("{}", self.info.fps); self.handle.draw_text(&fps_str, 10, 10, 30, Color::YELLOW); } } |