mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 10:53:17 +00:00
**New Features** * Runtime font accessors and new symbol fonts for text, launcher, statusbar, and shared icons. * Added font height base setting to device.properties * Text fonts now have 3 sizes: small, default, large **Improvements** * Renamed `UiScale` to `UiDensity` * Statusbar, toolbar and many UI components now compute heights and spacing from fonts/density. * SSD1306 initialization sequence refined for more stable startup. * Multiple image assets replaced by symbol-font rendering. * Many layout improvements related to density, font scaling and icon scaling * Updated folder name capitalization for newer style
33 lines
748 B
C
33 lines
748 B
C
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <tactility/log.h>
|
|
|
|
__attribute__((noreturn)) extern void __crash(void);
|
|
|
|
#define CHECK_GET_MACRO(_1, _2, NAME, ...) NAME
|
|
#define check(...) CHECK_GET_MACRO(__VA_ARGS__, CHECK_MSG, CHECK_NO_MSG)(__VA_ARGS__)
|
|
|
|
#define CHECK_NO_MSG(condition) \
|
|
do { \
|
|
if (!(condition)) { \
|
|
LOG_E("Error", "Check failed: %s\n\tat %s:%d", #condition, __FILE__, __LINE__); \
|
|
__crash(); \
|
|
} \
|
|
} while (0)
|
|
|
|
#define CHECK_MSG(condition, message) \
|
|
do { \
|
|
if (!(condition)) { \
|
|
LOG_E("Error", "Check failed: %s\n\tat %s:%d", message, __FILE__, __LINE__); \
|
|
__crash(); \
|
|
} \
|
|
} while (0)
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|