summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2025-01-22 17:27:34 +0100
committerMitya Selivanov <automainint@guattari.tech>2025-01-22 17:27:34 +0100
commitc0c52a07376d22339a06d031892af649c2eb8acc (patch)
tree5532ebac932b5c0414cee7d7099f3151b5bcbd01 /examples
parentfede6d46ef07c088f320db7f90a9e1479a3985bf (diff)
downloadreduced_system_layer-c0c52a07376d22339a06d031892af649c2eb8acc.zip
Clipboard image and sound proc decls
Diffstat (limited to 'examples')
-rw-r--r--examples/julia_set.c2
-rw-r--r--examples/ui.c8
2 files changed, 5 insertions, 5 deletions
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:;