diff options
| author | dario-loi <loi.1940849@studenti.uniroma1.it> | 2024-11-24 20:21:45 +0100 |
|---|---|---|
| committer | dario-loi <loi.1940849@studenti.uniroma1.it> | 2024-11-24 20:21:45 +0100 |
| commit | a3bfd065071e2dd4e772fae9da7908ce523148c6 (patch) | |
| tree | 68b062d79a1b5e59c2bcba2ca8df1cef9852f656 /fbgl.h | |
| parent | 274cacc5fadb3c3a220b833f027eee47cbda824c (diff) | |
| parent | cd0a47245a54c249eca7ef1c0d86bc4aa3489e9b (diff) | |
Merge branch 'master' into bugfixes
Diffstat (limited to 'fbgl.h')
| -rw-r--r-- | fbgl.h | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -161,10 +161,6 @@ void fbgl_clear(uint32_t color); void fbgl_put_pixel(int x, int y, uint32_t color, fbgl_t *fb); void fbgl_draw_line(fbgl_point_t x, fbgl_point_t y, uint32_t color, fbgl_t *fb); -/** - * Display methods - */ -void fbgl_display(void); /** * Access framebuffer data methods @@ -291,14 +287,14 @@ void fbgl_set_bg(fbgl_t *fb, uint32_t color) #endif // DEBUG // Fill the entire framebuffer with the specified color - for (uint32_t i = 0; i < fb->width * fb->height; i++) { + for (int32_t i = 0; i < fb->width * fb->height; i++) { fb->pixels[i] = color; } } void fbgl_put_pixel(int x, int y, uint32_t color, fbgl_t *fb) { -#ifdef DEBUG +#ifdef FBGL_VALIDATE_PUT_PIXEL if (!fb || !fb->pixels) { fprintf(stderr, "Error: framebuffer not initialized.\n"); return; @@ -307,7 +303,7 @@ void fbgl_put_pixel(int x, int y, uint32_t color, fbgl_t *fb) if (x < 0 || x >= fb->width || y < 0 || y >= fb->height) { return; // Ignore out-of-bound coordinates } -#endif // DEBUG +#endif // FBGL_VALIDATE_PUT_PIXEL const size_t index = y * fb->width + x; fb->pixels[index] = color; |
