diff options
author | tpart <tpart120@proton.me> | 2024-07-30 19:12:14 +0200 |
---|---|---|
committer | tpart <tpart120@proton.me> | 2024-07-30 19:12:14 +0200 |
commit | 78bffb007089657660dc2bf532f3f5a99452bb2f (patch) | |
tree | dc590f653f30d240b54fb8e6d8b7c9e089082644 | |
parent | 384cf75485be9ede9b5dad8c735d6b9fc33e5bb8 (diff) | |
download | hurrycurry-78bffb007089657660dc2bf532f3f5a99452bb2f.tar hurrycurry-78bffb007089657660dc2bf532f3f5a99452bb2f.tar.bz2 hurrycurry-78bffb007089657660dc2bf532f3f5a99452bb2f.tar.zst |
Add on_mobile() helper function
-rw-r--r-- | client/global.gd | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/client/global.gd b/client/global.gd index 0d62931b..a6bc349d 100644 --- a/client/global.gd +++ b/client/global.gd @@ -246,9 +246,13 @@ func load_settings(path: String): save_settings() # Save updated keys +func on_mobile() -> bool: + var os_name := OS.get_name() + return os_name == "Android" or os_name == "iOS" + func on_high_end() -> bool: var os_name := OS.get_name() - if os_name == "Android" or os_name == "iOS": + if on_mobile(): return false return on_vulkan() @@ -293,7 +297,6 @@ func set_profile(key: String, value): profile[key] = value save_profile() - func set_hint(key: String, value: bool): if !profile["hints"].has(key): push_error("Tried to set hint \"%s\", which does not yet exist (missing key)" % key) |