ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
Video chat in your terminal
Loading...
Searching...
No Matches
renderer.c
Go to the documentation of this file.
10#include <libplatform/font.h>
11#include <options/options.h>
12#include <ascii-chat/log/log.h>
13#include <libplatform/terminal.h>
14#include <libplatform/memory.h>
16#include <string.h>
21#include <ascii-chat/font.h>
22
23#define RENDER_AUTO_FONT_SIZE_PT 12.0
24#define RENDER_AUTO_VIDEO_MAX_DIMENSION 1280
25#define RENDER_AUTO_MIN_FONT_SIZE_PT 3.0
26
52
53asciichat_error_t render_file_create(const char *output_path, int cols, int rows, int fps, int theme, render_file_ctx_t **out) {
54 if (!output_path || !out || cols <= 0 || rows <= 0)
55 return SET_ERRNO(ERROR_INVALID_PARAM, "Missing render output, grid, or context");
56 *out = NULL;
57 log_info("output_path=%s, cols=%d, rows=%d, fps=%d, theme=%d, out=%p", output_path ? output_path : "(null)", cols, rows, fps, theme, (void *)out);
58 render_file_ctx_t *ctx = SAFE_CALLOC(1, sizeof(*ctx), render_file_ctx_t *);
59 if (strcmp(output_path, "/dev/null") == 0) {
60 ctx->discard = true;
61 ctx->error = ASCIICHAT_OK;
62 *out = ctx;
63 return ASCIICHAT_OK;
64 }
65 ctx->kitty_only = strcmp(output_path, "--kitty") == 0;
66 ctx->kitty = ctx->kitty_only || GET_OPTION(render_kitty);
67 if (ctx->kitty && !GET_OPTION(snapshot_mode)) {
68 SAFE_FREE(ctx);
69 return SET_ERRNO(ERROR_INVALID_PARAM, "Kitty graphics output requires --snapshot");
70 }
71 if (ctx->kitty && (strcmp(output_path, "-") == 0 || strcmp(output_path, "pipe:") == 0)) {
72 SAFE_FREE(ctx);
73 return SET_ERRNO(ERROR_INVALID_PARAM, "Kitty graphics and binary media cannot share stdout");
74 }
75 const char *term = SAFE_GETENV("TERM");
76 if (ctx->kitty && terminal_is_stdout_tty() && (!term || strcmp(term, "dumb") == 0 || strcmp(term, "linux") == 0 || strcmp(term, "vt100") == 0)) {
77 SAFE_FREE(ctx);
78 return SET_ERRNO(ERROR_NOT_SUPPORTED, "Kitty graphics require a capable terminal; redirect stdout to export the protocol");
79 }
80
81 // Resolve font spec → platform-appropriate file path, family name, or bundled data.
82 char font_spec[PLATFORM_MAX_PATH_LENGTH] = {0};
83 bool font_is_path = false;
84 const uint8_t *font_data = NULL;
85 size_t font_data_size = 0;
86 const char *raw_font = GET_OPTION(render_font);
87
88 // Log the font option value from GET_OPTION (for WASM font debugging)
89 log_info("[WASM_FONT_GETTER] GET_OPTION(render_font) returned: '%s' (empty=%d), GET_OPTION(matrix_rain)=%d", raw_font ? raw_font : "(null)", (!raw_font || raw_font[0] == '\0') ? 1 : 0,
90 GET_OPTION(matrix_rain));
91
92 // Auto-select matrix font when --matrix flag is set, unless user explicitly overrides with --render-font
93 log_debug("raw_font=%s, matrix_rain=%d", raw_font, GET_OPTION(matrix_rain));
94 if ((!raw_font || raw_font[0] == '\0') && GET_OPTION(matrix_rain)) {
95 raw_font = "matrix";
96 log_debug("[MATRIX] Using matrix font (enabled by --matrix flag)");
97 }
98
99 platform_font_register("matrix", g_font_matrix_resurrected, g_font_matrix_resurrected_size);
100 platform_font_register("default", g_font_default, g_font_default_size);
101 platform_font_register("DejaVu Sans Mono", g_font_default, g_font_default_size);
102 asciichat_error_t fe = platform_font_resolve(raw_font, font_spec, sizeof(font_spec), &font_is_path, &font_data, &font_data_size);
103 if (fe != ASCIICHAT_OK) {
104 if (raw_font && raw_font[0]) {
105 SAFE_FREE(ctx);
106 return fe;
107 }
108 log_warn("font resolution failed for '%s' — using bundled default", raw_font ? raw_font : "(explicit system)");
109 fe = platform_font_resolve("default", font_spec, sizeof(font_spec), &font_is_path, &font_data, &font_data_size);
110 if (fe != ASCIICHAT_OK) {
111 SAFE_FREE(ctx);
112 return fe;
113 }
114 }
115
116 log_debug("Font resolved: font_spec='%s', font_is_path=%d, font_data=%p (size=%zu)", font_spec, font_is_path, (void *)font_data, font_data_size);
117
118 // A zero size selects a compact default for video; explicit font sizes keep
119 // their exact dimensions. Images and Kitty snapshots retain the 12 pt default.
120 double font_size_pt = GET_OPTION(render_font_size);
121 const char *extension = strrchr(output_path, '.');
122 bool is_image = extension && (!strcmp(extension, ".png") || !strcmp(extension, ".jpg") || !strcmp(extension, ".jpeg") || !strcmp(extension, ".bmp") || !strcmp(extension, ".webp"));
123 bool automatic_video_size = font_size_pt == 0.0 && !is_image && !ctx->kitty;
124 if (font_size_pt == 0.0) {
125 font_size_pt = RENDER_AUTO_FONT_SIZE_PT;
126 if (automatic_video_size) {
127 double width_scale = (double)RENDER_AUTO_VIDEO_MAX_DIMENSION / ((double)cols * 10.0);
128 double height_scale = (double)RENDER_AUTO_VIDEO_MAX_DIMENSION / ((double)rows * 20.0);
129 double scale = width_scale < height_scale ? width_scale : height_scale;
130 if (scale < 1.0)
131 font_size_pt *= scale;
132 if (font_size_pt < RENDER_AUTO_MIN_FONT_SIZE_PT)
133 font_size_pt = RENDER_AUTO_MIN_FONT_SIZE_PT;
134 }
135 }
136 term_renderer_theme_t resolved_theme = (term_renderer_theme_t)theme;
137 if (resolved_theme == TERM_RENDERER_THEME_AUTO) {
139 log_debug("auto theme resolved to %s", resolved_theme == TERM_RENDERER_THEME_DARK ? "dark" : "light");
140 }
141
142 term_renderer_config_t tr_cfg = {
143 .cols = cols,
144 .rows = rows,
145 .font_size_pt = font_size_pt,
146 .theme = resolved_theme,
147 .font_is_path = font_is_path,
148 .font_data = font_data,
149 .font_data_size = font_data_size,
150 };
151 SAFE_STRNCPY(tr_cfg.font_spec, font_spec, sizeof(tr_cfg.font_spec));
152
153 asciichat_error_t err = term_renderer_create(&tr_cfg, &ctx->renderer);
154 if (err != ASCIICHAT_OK) {
155 log_error("term_renderer_create failed: %s", asciichat_error_format(NULL, err));
156 SAFE_FREE(ctx);
157 return err;
158 }
159 int actual_width_px = term_renderer_width_px(ctx->renderer);
160 int actual_height_px = term_renderer_height_px(ctx->renderer);
161 // Hinting and font metrics vary. Recalculate once if the initial estimate
162 // exceeds the target, retaining the original renderer if a bitmap font
163 // cannot be scaled down.
164 if (automatic_video_size && (actual_width_px > RENDER_AUTO_VIDEO_MAX_DIMENSION || actual_height_px > RENDER_AUTO_VIDEO_MAX_DIMENSION) && font_size_pt > RENDER_AUTO_MIN_FONT_SIZE_PT) {
165 double width_scale = (double)RENDER_AUTO_VIDEO_MAX_DIMENSION / actual_width_px;
166 double height_scale = (double)RENDER_AUTO_VIDEO_MAX_DIMENSION / actual_height_px;
167 double scale = width_scale < height_scale ? width_scale : height_scale;
168 double smaller = font_size_pt * scale * 0.98;
169 if (smaller < RENDER_AUTO_MIN_FONT_SIZE_PT)
171 tr_cfg.font_size_pt = smaller;
172 terminal_renderer_t *candidate = NULL;
173 err = term_renderer_create(&tr_cfg, &candidate);
174 if (err == ASCIICHAT_OK) {
175 int candidate_width = term_renderer_width_px(candidate);
176 int candidate_height = term_renderer_height_px(candidate);
177 if (candidate_width <= actual_width_px && candidate_height <= actual_height_px && (candidate_width < actual_width_px || candidate_height < actual_height_px)) {
179 ctx->renderer = candidate;
180 actual_width_px = candidate_width;
181 actual_height_px = candidate_height;
182 } else {
183 term_renderer_destroy(candidate);
184 }
185 } else {
187 SAFE_FREE(ctx);
188 return err;
189 }
190 }
191 log_info("GRID DIMENSIONS: %ux%u cells -> PIXEL DIMENSIONS: %dx%d px", cols, rows, actual_width_px, actual_height_px);
192 log_debug("term_renderer created (%dx%d cells, %dx%d px)", cols, rows, actual_width_px, actual_height_px);
193
194 if (ctx->kitty_only) {
195 ctx->fps = fps;
196 ctx->progress = render_progress_create(true, "terminal");
197 NAMED_REGISTER_CONTEXT(ctx, "render_file_ctx", output_path, NULL);
199 *out = ctx;
200 return ASCIICHAT_OK;
201 }
202 int output_width_px = actual_width_px;
203 int output_height_px = actual_height_px;
204 if (automatic_video_size && (output_width_px > RENDER_AUTO_VIDEO_MAX_DIMENSION || output_height_px > RENDER_AUTO_VIDEO_MAX_DIMENSION)) {
205 double scale_x = (double)RENDER_AUTO_VIDEO_MAX_DIMENSION / output_width_px;
206 double scale_y = (double)RENDER_AUTO_VIDEO_MAX_DIMENSION / output_height_px;
207 double scale = scale_x < scale_y ? scale_x : scale_y;
208 output_width_px = ((int)(output_width_px * scale)) & ~1;
209 output_height_px = ((int)(output_height_px * scale)) & ~1;
210 if (output_width_px < 2)
211 output_width_px = 2;
212 if (output_height_px < 2)
213 output_height_px = 2;
214 }
215 err = ffmpeg_encoder_create_scaled(output_path, actual_width_px, actual_height_px, output_width_px, output_height_px, fps, &ctx->encoder);
216 if (err != ASCIICHAT_OK) {
217 log_error("ffmpeg_encoder_create failed: %s", asciichat_error_format(NULL, err));
219 SAFE_FREE(ctx);
220 return err;
221 }
222 log_debug("ffmpeg_encoder created successfully");
223
224 // Initialize audio fields
225 ctx->audio_sample_rate = 48000; // Audio pipeline is 48kHz
226 ctx->fps = fps;
227 // Allocate large buffer for snapshot mode (5 seconds at 48kHz with ~14 FPS = 3,428 samples per frame)
228 // Use 8192 to comfortably handle snapshot reads without excessive overhead
229 ctx->audio_buf_size = 8192; // Temporary buffer for reading audio (in floats)
230 ctx->audio_read_buf = SAFE_MALLOC(ctx->audio_buf_size * sizeof(float), float *);
231
233 if (err != ASCIICHAT_OK) {
237 SAFE_FREE(ctx);
238 return err;
239 }
240 log_info("initialized encoder for %s", output_path);
241
242 // Register render file context for debugging
243 NAMED_REGISTER_CONTEXT(ctx, "render_file_ctx", output_path, NULL);
244
245 bool binary_stdout = strcmp(output_path, "-") == 0 || strcmp(output_path, "pipe:") == 0;
246 ctx->progress = render_progress_create(!binary_stdout, output_path);
248 *out = ctx;
249 return ASCIICHAT_OK;
250}
251
253 if (ctx) {
254 ctx->live_timing = true;
255 if (ctx->encoder)
257 }
258}
259
260static asciichat_error_t render_file_write_frame_internal(render_file_ctx_t *ctx, const char *ansi_frame, uint64_t captured_ns) {
261
262 if (!ctx) {
263 log_warn("ctx is NULL");
264 return ASCIICHAT_OK;
265 }
266
267 if (!ansi_frame) {
268 log_warn("ansi_frame is NULL");
269 return ASCIICHAT_OK;
270 }
271
272 size_t frame_len = strlen(ansi_frame);
273 uint64_t frame_index = ctx->frames_written;
274 if (ctx->live_timing && ctx->frames_written > 0) {
275 uint64_t elapsed = captured_ns > ctx->first_frame_ns ? captured_ns - ctx->first_frame_ns : 0;
276 frame_index = elapsed / 1000000000ULL * ctx->fps + elapsed % 1000000000ULL * ctx->fps / 1000000000ULL;
277 if (frame_index <= ctx->last_frame_index)
278 return ASCIICHAT_OK;
279 }
280 uint64_t render_started_ns = time_get_ns();
281 asciichat_error_t err = term_renderer_feed(ctx->renderer, ansi_frame, frame_len);
282 uint64_t rasterized_ns = time_get_ns();
283 if (err != ASCIICHAT_OK) {
284 log_warn("term_renderer_feed failed: %s", asciichat_error_format(NULL, err));
285 return err;
286 }
287 if (ctx->kitty_only) {
288 ctx->frames_written++;
289 return ASCIICHAT_OK;
290 }
291
292 const uint8_t *pixels = term_renderer_pixels(ctx->renderer);
293 int pitch = term_renderer_pitch(ctx->renderer);
294 // sws_scale consumes the renderer's pixels synchronously before returning.
295 // The renderer is owned by this encoder thread and is not updated until the
296 // next call, so copying the entire RGBA frame is unnecessary.
297 err = ffmpeg_encoder_write_frame(ctx->encoder, pixels, pitch, captured_ns);
298 uint64_t encoded_ns = time_get_ns();
299 log_debug_every(US_PER_SEC_INT, "RECORD_STAGE: raster_ms=%.2f encode_ms=%.2f bytes=%zu", (double)(rasterized_ns - render_started_ns) / NS_PER_MS_INT,
300 (double)(encoded_ns - rasterized_ns) / NS_PER_MS_INT, frame_len);
301 if (err != ASCIICHAT_OK) {
302 log_warn("ffmpeg_encoder_write_frame failed: %s", asciichat_error_format(NULL, err));
303 }
304
305 if (err == ASCIICHAT_OK) {
306 if (ctx->frames_written == 0) {
307 ctx->first_frame_ns = captured_ns;
308 audio_recording_start(ctx->recording, captured_ns);
309 }
310 ctx->frames_written++;
311 ctx->last_frame_index = frame_index;
312 uint64_t target = ((ctx->live_timing ? frame_index + 1 : ctx->frames_written) * ctx->audio_sample_rate / ctx->fps) * 2;
313 ctx->audio_target = target;
314 /* Keep 100 ms pending so audio callbacks can deliver samples before encoding. */
315 uint64_t ready = target > 9600 ? target - 9600 : 0;
316 while (ctx->audio_samples_written < ready) {
317 int count = (int)((ready - ctx->audio_samples_written) > (uint64_t)ctx->audio_buf_size ? (uint64_t)ctx->audio_buf_size : ready - ctx->audio_samples_written);
319 err = ffmpeg_encoder_write_audio(ctx->encoder, ctx->audio_read_buf, count);
320 if (err != ASCIICHAT_OK)
321 break;
322 ctx->audio_samples_written += count;
323 }
324 }
325
326 return err;
327}
328
330 if (!ctx || !frame)
331 return SET_ERRNO(ERROR_INVALID_PARAM, "Missing render context or frame");
332 if (ctx->error != ASCIICHAT_OK)
333 return ctx->error;
334 if (ctx->discard)
335 return ASCIICHAT_OK;
336 asciichat_error_t err = render_file_write_frame_internal(ctx, frame, captured_ns);
337 if (err != ASCIICHAT_OK)
339 render_progress_frame(ctx->progress, frame, err == ASCIICHAT_OK);
340 if (err != ASCIICHAT_OK)
341 ctx->error = err;
342 return err;
343}
344
345void render_file_begin_drain(render_file_ctx_t *ctx, uint64_t total, bool total_known) {
346 if (ctx)
347 render_progress_begin(ctx->progress, total, total_known);
348}
349
350void render_file_set_snapshot_actual_duration(render_file_ctx_t *ctx, double actual_duration_sec) {
351 if (!ctx || !ctx->encoder)
352 return;
353 ffmpeg_encoder_set_snapshot_actual_duration(ctx->encoder, actual_duration_sec);
354}
355
357 if (!ctx)
358 return ASCIICHAT_OK;
359 if (ctx->discard) {
360 SAFE_FREE(ctx);
361 return ASCIICHAT_OK;
362 }
363 NAMED_UNREGISTER(ctx);
366 uint64_t target = ctx->audio_target;
368 while (ctx->audio_samples_written < target) {
369 int count = (int)((target - ctx->audio_samples_written) > (uint64_t)ctx->audio_buf_size ? (uint64_t)ctx->audio_buf_size : target - ctx->audio_samples_written);
371 err = ffmpeg_encoder_write_audio(ctx->encoder, ctx->audio_read_buf, count);
372 if (err != ASCIICHAT_OK)
373 break;
374 ctx->audio_samples_written += count;
375 }
378 if (err == ASCIICHAT_OK)
379 err = close_err;
380 if (ctx->error != ASCIICHAT_OK)
381 err = ctx->error;
383 if (err == ASCIICHAT_OK && ctx->kitty && ctx->frames_written == 0)
384 err = SET_ERRNO(ERROR_MEDIA_INIT, "No snapshot was rendered for Kitty output");
385 if (err == ASCIICHAT_OK && ctx->kitty && ctx->frames_written > 0)
390 SAFE_FREE(ctx);
391 return err;
392}
const char * asciichat_error_format(const char *message, asciichat_error_t code)
#define SET_ERRNO(code,...)
terminal_background_t colorscheme_current_background(void)
@ TERM_BACKGROUND_DARK
Definition colorscheme.h:71
Named object registry for debugging — log identifiable resource names.
void ffmpeg_encoder_set_snapshot_actual_duration(ffmpeg_encoder_t *enc, double actual_duration_sec)
asciichat_error_t ffmpeg_encoder_create_scaled(const char *output_path, int source_width, int source_height, int width_px, int height_px, int fps, ffmpeg_encoder_t **out)
void ffmpeg_encoder_set_live_timing(ffmpeg_encoder_t *enc)
asciichat_error_t ffmpeg_encoder_write_frame(ffmpeg_encoder_t *enc, const uint8_t *rgb, int pitch, uint64_t captured_ns)
asciichat_error_t ffmpeg_encoder_destroy(ffmpeg_encoder_t *enc)
asciichat_error_t ffmpeg_encoder_write_audio(ffmpeg_encoder_t *enc, const float *samples, int num_samples)
FFmpeg video/image file encoder — codec selected from file extension.
struct ffmpeg_encoder_s ffmpeg_encoder_t
unsigned int uint32_t
#define SAFE_STRNCPY(dst, src, size)
#define SAFE_FREE(ptr)
#define SAFE_MALLOC(size, cast)
#define SAFE_GETENV(name)
#define SAFE_CALLOC(count, size, cast)
unsigned long long uint64_t
unsigned char uint8_t
#define NAMED_REGISTER_CONTEXT(context, context_type, name, parent_ptr)
Register a generic context with automatic format specifier.
#define NAMED_UNREGISTER(ptr)
Unregister a pointer.
asciichat_error_t
Error and exit codes - unified status values (0-255).
Definition error_codes.h:48
@ ASCIICHAT_OK
Definition error_codes.h:50
@ ERROR_MEDIA_INIT
Definition error_codes.h:70
@ ERROR_INVALID_PARAM
@ ERROR_NOT_SUPPORTED
Definition error_codes.h:74
#define log_warn(...)
Log a WARN message.
Definition log/log.h:591
#define log_error(...)
Log an ERROR message.
Definition log/log.h:604
#define log_info(...)
Log an INFO message.
Definition log/log.h:578
#define log_debug(...)
Log a DEBUG message.
Definition log/log.h:565
#define NS_PER_MS_INT
Definition time.h:172
#define US_PER_SEC_INT
Definition time.h:177
#define GET_OPTION(field)
Definition options.h:1339
Font resolution and bundled font data.
const size_t g_font_matrix_resurrected_size
const unsigned char g_font_matrix_resurrected[]
const size_t g_font_default_size
const unsigned char g_font_default[]
int term_renderer_width_px(terminal_renderer_t *r)
const uint8_t * term_renderer_pixels(terminal_renderer_t *r)
asciichat_error_t term_renderer_create(const term_renderer_config_t *cfg, terminal_renderer_t **out)
void term_renderer_destroy(terminal_renderer_t *r)
asciichat_error_t term_renderer_feed(terminal_renderer_t *r, const char *ansi_frame, size_t len)
int term_renderer_pitch(terminal_renderer_t *r)
int term_renderer_height_px(terminal_renderer_t *r)
📝 Logging API with multiple log levels and terminal output control
#define log_debug_every(interval_us, fmt,...)
Rate-limited DEBUG logging.
Definition log/log.h:719
asciichat_error_t kitty_image_write(FILE *stream, const uint8_t *rgba, int width, int height, int pitch)
⚙️ Unified options parsing system for ascii-chat with builder pattern and lock-free access
static bool size_t gotel_query_t * out
Definition queries.h:10
asciichat_error_t audio_recording_create_channels(audio_recording_t **out, unsigned channels)
Definition recording.c:35
void audio_recording_read(audio_recording_t *recording, float *samples, size_t count)
Definition recording.c:145
void audio_recording_destroy(audio_recording_t *recording)
Definition recording.c:59
void audio_recording_start(audio_recording_t *recording, uint64_t epoch_ns)
Definition recording.c:73
struct audio_recording audio_recording_t
Definition recording.h:12
void render_progress_finalize(render_progress_t *progress)
render_progress_t * render_progress_create(bool enabled, const char *destination)
void render_progress_frame(render_progress_t *progress, const char *frame, bool succeeded)
void render_progress_begin(render_progress_t *progress, uint64_t total, bool total_known)
void render_progress_destroy(render_progress_t *progress)
struct render_progress render_progress_t
void render_file_set_snapshot_actual_duration(render_file_ctx_t *ctx, double actual_duration_sec)
Definition renderer.c:350
asciichat_error_t render_file_write_frame(render_file_ctx_t *ctx, const char *frame, uint64_t captured_ns)
Definition renderer.c:329
void render_file_set_live_timing(render_file_ctx_t *ctx)
Definition renderer.c:252
asciichat_error_t render_file_create(const char *output_path, int cols, int rows, int fps, int theme, render_file_ctx_t **out)
Definition renderer.c:53
#define RENDER_AUTO_VIDEO_MAX_DIMENSION
Definition renderer.c:24
#define RENDER_AUTO_FONT_SIZE_PT
Definition renderer.c:23
#define RENDER_AUTO_MIN_FONT_SIZE_PT
Definition renderer.c:25
asciichat_error_t render_file_destroy(render_file_ctx_t *ctx)
Definition renderer.c:356
void render_file_begin_drain(render_file_ctx_t *ctx, uint64_t total, bool total_known)
Definition renderer.c:345
Terminal-to-pixel renderer and render-file output (audio + video).
struct terminal_renderer_s terminal_renderer_t
Definition renderer.h:22
term_renderer_theme_t
Terminal rendering theme.
Definition renderer.h:31
@ TERM_RENDERER_THEME_LIGHT
Definition renderer.h:33
@ TERM_RENDERER_THEME_DARK
Definition renderer.h:32
@ TERM_RENDERER_THEME_AUTO
Definition renderer.h:34
struct render_file_ctx_s render_file_ctx_t
Definition renderer.h:69
bool terminal_is_stdout_tty(void)
🔤 String Manipulation and Shell Escaping Utilities
For render file ctx, this is the live record that ties progress, error, renderer, encoder together....
Definition renderer.c:32
uint64_t audio_samples_written
Definition renderer.c:39
asciichat_error_t error
Definition renderer.c:34
render_progress_t * progress
Definition renderer.c:33
terminal_renderer_t * renderer
Definition renderer.c:35
uint64_t frames_written
Definition renderer.c:38
uint64_t first_frame_ns
Definition renderer.c:40
ffmpeg_encoder_t * encoder
Definition renderer.c:36
uint32_t audio_sample_rate
Definition renderer.c:47
uint64_t audio_target
Definition renderer.c:42
audio_recording_t * recording
Definition renderer.c:37
float * audio_read_buf
Definition renderer.c:49
uint64_t last_frame_index
Definition renderer.c:41
char font_spec[PLATFORM_MAX_PATH_LENGTH]
Definition renderer.h:42
⏱️ High-precision timing utilities using sokol_time.h and uthash
void ui_controller_title_render(ui_title_render_t phase)
@ UI_TITLE_FINALIZING
@ UI_TITLE_RENDERING
@ UI_TITLE_FAILED
@ UI_TITLE_IDLE