2025-09-29 09:25:24 +08:00
|
|
|
#include "theme.h"
|
|
|
|
|
|
|
|
|
|
#include "detection/os/os.h"
|
|
|
|
|
|
2026-03-29 09:28:49 +08:00
|
|
|
const char* ffDetectTheme(FFThemeResult* result) {
|
2025-09-29 09:25:24 +08:00
|
|
|
const FFOSResult* os = ffDetectOS();
|
|
|
|
|
|
|
|
|
|
char* str_end;
|
|
|
|
|
const char* version = os->version.chars;
|
|
|
|
|
unsigned long osNum = strtoul(version, &str_end, 10);
|
2026-03-29 09:28:49 +08:00
|
|
|
if (str_end != version) {
|
2025-09-29 09:25:24 +08:00
|
|
|
if (osNum > 15) { // Tahoe
|
|
|
|
|
ffStrbufSetStatic(&result->theme1, "Liquid Glass");
|
|
|
|
|
} else if (osNum < 10) {
|
|
|
|
|
ffStrbufSetStatic(&result->theme1, "Platinum");
|
|
|
|
|
} else {
|
|
|
|
|
ffStrbufSetStatic(&result->theme1, "Aqua");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|