From 6c286b65a834f39f92868073e1e4a78b6ca1c55a Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sun, 7 Jan 2024 02:20:40 +0000 Subject: [PATCH] Define supported frame rates --- include/fps.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 include/fps.h diff --git a/include/fps.h b/include/fps.h new file mode 100644 index 0000000..6320cfc --- /dev/null +++ b/include/fps.h @@ -0,0 +1,38 @@ +#ifndef FPS_H +#define FPS_H + +#include "SDL_render.h" + +enum fps_indices { + FPS_12, + FPS_23_976, + FPS_24, + FPS_25, + FPS_29_97, + FPS_30, + FPS_48, + FPS_50, + FPS_59_94, + FPS_60, + + COUNT_FPS, +}; + +// clang-format off +const char *fps_names[] = { + [FPS_12] = "12.0", + [FPS_23_976] = "23.976", + [FPS_24] = "24.0", + [FPS_25] = "25.0", + [FPS_29_97] = "29.97", + [FPS_30] = "30.0", + [FPS_48] = "48.0", + [FPS_50] = "50.0", + [FPS_59_94] = "59.94", + [FPS_60] = "60.0", +}; +// clang-format on + +SDL_Texture *fps_textures[COUNT_FPS] = {0}; +SDL_Texture *fps_textures_selected[COUNT_FPS] = {0}; +#endif // !FPS_H