diff options
Diffstat (limited to 'src/fb.c')
| -rw-r--r-- | src/fb.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -64,6 +64,10 @@ bool pw_fb_iterate(struct pw_framebuffer *fb) { static uint8_t project_component(float r, float start, float size, uint8_t dim) { + if (SDL_fabsf(size) < 1.) { + return 0; + } + float dimf = (float)dim; float df = SDL_floorf(((r - start) * dimf) / size); return (uint8_t)SDL_clamp(df, 0.0, (float)(dim - 1)); |
