mirror of
https://github.com/vanilla-wiiu/vanilla.git
synced 2026-10-28 09:43:51 +00:00
commit 54e685ba9fef2b5fc1505ddc932e4fa3fe87ed68 Author: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Wed Aug 26 17:46:15 2026 -0700 improvements commitb442a51a71Author: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Wed Aug 26 14:49:31 2026 -0700 docker: add new build deps for android commit1e6370391eMerge:b21181c0681459Author: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Wed Aug 26 14:37:15 2026 -0700 Merge branch 'master' into brightness commitb21181c675Author: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Sun Aug 23 16:58:09 2026 -0700 update display brightness - initial implementation
27 lines
778 B
C
27 lines
778 B
C
#ifndef VANILLA_PI_UI_UTIL_H
|
|
#define VANILLA_PI_UI_UTIL_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include <string.h>
|
|
|
|
void vui_strncpy(char *dst, const char *src, size_t max_dst_size);
|
|
size_t vui_utf8_cp_len(const char *s);
|
|
char *vui_utf8_advance(char *s);
|
|
|
|
#define CLAMP(x, low, high) (((x) < (low)) ? (low) : ((x) > (high)) ? (high) : (x))
|
|
|
|
static inline int intmin(int a, int b) { return a < b ? a : b; }
|
|
static inline int intmax(int a, int b) { return a > b ? a : b; }
|
|
static inline int64_t int64min(int64_t a, int64_t b) { return a < b ? a : b; }
|
|
static inline int64_t int64max(int64_t a, int64_t b) { return a > b ? a : b; }
|
|
|
|
static inline int32_t pack_float(float f)
|
|
{
|
|
int32_t x;
|
|
memcpy(&x, &f, sizeof(int32_t));
|
|
return x;
|
|
}
|
|
|
|
#endif // VANILLA_PI_UI_UTIL_H
|