From c0c52a07376d22339a06d031892af649c2eb8acc Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Wed, 22 Jan 2025 17:27:34 +0100 Subject: Clipboard image and sound proc decls --- examples/julia_set.c | 2 +- examples/ui.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/julia_set.c b/examples/julia_set.c index e819ca5..288dac2 100644 --- a/examples/julia_set.c +++ b/examples/julia_set.c @@ -22,7 +22,7 @@ void apply_scale(f64 delta) { } f64 ds = view_s * delta * .1; - if (view_s + ds < EPSILON) + if (view_s + ds < 1e-12) return; f64 dx = (g_platform.cursor_x * 1. - g_platform.real_width * .5); f64 dy = (g_platform.cursor_y * 1. - g_platform.real_height * .5); diff --git a/examples/ui.c b/examples/ui.c index c10a9c6..022a463 100644 --- a/examples/ui.c +++ b/examples/ui.c @@ -80,8 +80,8 @@ void update_and_render_frame(void) { text_len -= i1 - i0; } - for (i64 n = 0; n < g_platform.clipboard_size;) { - UTF8_Char c = utf8_read(g_platform.clipboard_size - n, g_platform.clipboard + n); + for (i64 n = 0; n < g_platform.clipboard_text_len;) { + UTF8_Char c = utf8_read(g_platform.clipboard_text_len - n, g_platform.clipboard_text + n); if (text_len < (i64) (sizeof text / sizeof *text)) { for (i64 j = text_len; j > cursor; --j) @@ -104,7 +104,7 @@ void update_and_render_frame(void) { len += utf8_write(text[i0 + i], buf + len); if (len > 0) - p_clipboard_write(len, buf); + p_clipboard_write_text(len, buf); for (i64 i = 0; i1 + i < text_len; ++i) text[i0 + i] = text[i1 + i]; @@ -123,7 +123,7 @@ void update_and_render_frame(void) { len += utf8_write(text[i0 + i], buf + len); if (len > 0) - p_clipboard_write(len, buf); + p_clipboard_write_text(len, buf); } break; default:; -- cgit v1.2.3