diff options
| author | lvntky <klevent1903@gmail.com> | 2024-11-27 11:53:52 +0300 |
|---|---|---|
| committer | lvntky <klevent1903@gmail.com> | 2024-11-27 11:53:52 +0300 |
| commit | eff7f86c4b81e804b13c5606fcc73a6dbfa58677 (patch) | |
| tree | 916f6e1904649470406257264af4360db9b1e76e /examples/texture_show_fps.c | |
| parent | 39ff731d15d3be96be7a5a65ad7d530dc11aeb20 (diff) | |
[fix] examples fixed
Diffstat (limited to 'examples/texture_show_fps.c')
| -rw-r--r-- | examples/texture_show_fps.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/examples/texture_show_fps.c b/examples/texture_show_fps.c index 0b079c7..90ddc4f 100644 --- a/examples/texture_show_fps.c +++ b/examples/texture_show_fps.c @@ -50,7 +50,6 @@ int main(int argc, char **argv) fbgl_psf1_font_t *font = fbgl_load_psf1_font(argv[2]); while (framesize) { - // Clear the framebuffer (set background) fbgl_set_bg(&framebuffer, 0x000000); @@ -71,23 +70,18 @@ int main(int argc, char **argv) if (texture_y <= 0 || texture_y + texture->height >= framebuffer.height) { dy = -dy; // Reverse vertical direction when hitting the top or bottom edge - } + } - - fbgl_render_psf1_text(&framebuffer, font, "FPS: ", 5, 0, 0xFF0000); + fbgl_render_psf1_text(&framebuffer, font, "FPS: ", 5, 0, + 0xFF0000); char *fps = float_to_string(fbgl_get_fps()); - fbgl_render_psf1_text(&framebuffer, font, fps, 100, 0, 0xFF0000); + fbgl_render_psf1_text(&framebuffer, font, fps, 100, 0, + 0xFF0000); usleep(50000); // Delay to make the marquee effect visible (adjust as needed) framesize--; } - // Wait for the user to press the escape key before exiting - printf("Press ESC to exit...\n"); - while (!fbgl_check_esc_key()) { - // You can add additional rendering logic here if needed - } - // Clean up fbgl_destroy_texture(texture); fbgl_destroy(&framebuffer); |
