diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2025-02-04 23:39:24 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2025-02-04 23:39:24 +0100 |
| commit | 64308c9e520dbd8e72b675d0ba064ecdaf9bd494 (patch) | |
| tree | ff8dc176d62340df9565e424f19b9d6349c4e8b8 /lib/nes/app/graphics/renderer.cc | |
| parent | 79553ab1fa3d707612e80dd03bf95ca65fa0c411 (diff) | |
add error handling to ui
Diffstat (limited to 'lib/nes/app/graphics/renderer.cc')
| -rw-r--r-- | lib/nes/app/graphics/renderer.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/nes/app/graphics/renderer.cc b/lib/nes/app/graphics/renderer.cc index 6429a52..d512e71 100644 --- a/lib/nes/app/graphics/renderer.cc +++ b/lib/nes/app/graphics/renderer.cc @@ -129,7 +129,7 @@ namespace nes::app i32 const x, i32 const y, u32 const width, u32 const height, color const c) -> void { if (c == color::transparent) { return; } - if (x >= static_cast<i32>(width) || y >= static_cast<i32>(height)) { return; } + if (x >= static_cast<i32>(renderer::width) || y >= static_cast<i32>(renderer::height)) { return; } auto const resolved = resolve_color(c); auto const x_stop = std::min(x + static_cast<i32>(width), static_cast<i32>(renderer::width)); |
