Replace repetitive meta/ctrl condition with a method

This commit is contained in:
kobewi
2025-07-05 15:45:04 +02:00
parent 2d86b69bf1
commit 98141c3d73
11 changed files with 25 additions and 13 deletions

View File

@@ -55,6 +55,16 @@ OS *OS::get_singleton() {
return singleton;
}
bool OS::prefer_meta_over_ctrl() {
#if defined(MACOS_ENABLED) || defined(APPLE_EMBEDDED_ENABLED)
return true;
#elif defined(WEB_ENABLED)
return singleton->has_feature("web_macos") || singleton->has_feature("web_ios");
#else
return false;
#endif
}
uint64_t OS::get_ticks_msec() const {
return get_ticks_usec() / 1000ULL;
}