mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Replace repetitive meta/ctrl condition with a method
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user