From 6352bcd0a63b87aaca5791ce89373843ae0bd2c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20B=C3=A9rub=C3=A9?= Date: Sat, 11 May 2024 13:09:51 -0400 Subject: [PATCH] Missing shim for infinity6b0 --- osd/Makefile | 2 +- osd/compat.c | 2 ++ osd/text.c | 4 +--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/osd/Makefile b/osd/Makefile index c4e4969..1353a9e 100644 --- a/osd/Makefile +++ b/osd/Makefile @@ -18,7 +18,7 @@ osd-inge: osd-star6b0: $(eval SDK = ../sdk/infinity6) - $(eval LIB = -D__SIGMASTAR__ -D__INFINITY6__ -lcam_os_wrapper -lm -lmi_rgn -lmi_sys) + $(eval LIB = -D__SIGMASTAR__ -D__INFINITY6__ -D__INFINITY6B0__ -lcam_os_wrapper -lm -lmi_rgn -lmi_sys) $(BUILD) osd-star6e: diff --git a/osd/compat.c b/osd/compat.c index b241c1d..5595ae1 100644 --- a/osd/compat.c +++ b/osd/compat.c @@ -24,4 +24,6 @@ void __pthread_unregister_cancel(void) {} void *mmap(void *start, size_t len, int prot, int flags, int fd, unsigned int off) { return (void *)syscall(SYS_mmap2, start, len, prot, flags, fd, off >> 12); } +#elif defined(__SIGMASTAR__) && defined(__INFINITY6B0__) +void __stdin(void) {} #endif \ No newline at end of file diff --git a/osd/text.c b/osd/text.c index 6def62c..be70873 100644 --- a/osd/text.c +++ b/osd/text.c @@ -108,9 +108,7 @@ RECT measure_text(const char *font, double size, const char *text) calcdim(&margin, &height, &width, text); // Some platforms operate with a coarse pixel size of 2x2 // and rounding up is required for a sufficient canvas size - RECT rect = { .height = ceil(height), .width = ceil(width) }; - rect.height += rect.height & 1; - rect.width += rect.width & 1; + RECT rect = { .height = ceil(height + (height & 1)), .width = ceil(width + (width & 1)) }; sft_freefont(sft.font); return rect;