diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2023-07-07 14:51:44 -0500 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2023-07-07 14:51:51 -0500 |
commit | ebc6ec16928fd4e788686e41c7210f0abbbd1d0a (patch) | |
tree | f69798e00bee287d2413c16980c0e05c568de4ef | |
parent | c3b0a92c3cd9a219c1b1776b48c147f1d0602f07 (diff) | |
download | redot-engine-ebc6ec16928fd4e788686e41c7210f0abbbd1d0a.tar.gz |
Fix incorrect documentation for `Engine.get_architecture_name()`
-rw-r--r-- | doc/classes/Engine.xml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index 6a9db95936..207cd0bccc 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -12,20 +12,20 @@ <method name="get_architecture_name" qualifiers="const"> <return type="String" /> <description> - Returns the name of the CPU architecture the Godot binary was built for. Possible return values are [code]x86_64[/code], [code]x86_32[/code], [code]arm64[/code], [code]armv7[/code], [code]rv64[/code], [code]riscv[/code], [code]ppc64[/code], [code]ppc[/code], [code]wasm64[/code] and [code]wasm32[/code]. + Returns the name of the CPU architecture the Godot binary was built for. Possible return values are [code]x86_64[/code], [code]x86_32[/code], [code]arm64[/code], [code]arm32[/code], [code]rv64[/code], [code]riscv[/code], [code]ppc64[/code], [code]ppc[/code], [code]wasm64[/code] and [code]wasm32[/code]. To detect whether the current CPU architecture is 64-bit, you can use the fact that all 64-bit architecture names have [code]64[/code] in their name: [codeblocks] [gdscript] if "64" in Engine.get_architecture_name(): - print("Running on 64-bit CPU.") + print("Running a 64-bit build of Godot.") else: - print("Running on 32-bit CPU.") + print("Running a 32-bit build of Godot.") [/gdscript] [csharp] if (Engine.GetArchitectureName().Contains("64")) - GD.Print("Running on 64-bit CPU."); + GD.Print("Running a 64-bit build of Godot."); else - GD.Print("Running on 32-bit CPU."); + GD.Print("Running a 32-bit build of Godot."); [/csharp] [/codeblocks] [b]Note:[/b] [method get_architecture_name] does [i]not[/i] return the name of the host CPU architecture. For example, if running an x86_32 Godot binary on a x86_64 system, the returned value will be [code]x86_32[/code]. |