Add an OS.get_processor_name() method

This method can be used to get the CPU model name.
It can be used in conjunction with
`RenderingServer.get_video_adapter_name()` and
`RenderingServer.get_video_adapter_vendor()` for annotating benchmarks
and automatic graphics quality configuration.
This commit is contained in:
Hugo Locurcio 2020-12-27 01:50:21 +01:00
parent 171021145d
commit ee7cd9a3a1
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
13 changed files with 78 additions and 1 deletions

View file

@ -362,6 +362,10 @@ int OS::get_processor_count() const {
return ::OS::get_singleton()->get_processor_count();
}
String OS::get_processor_name() const {
return ::OS::get_singleton()->get_processor_name();
}
bool OS::is_stdout_verbose() const {
return ::OS::get_singleton()->is_stdout_verbose();
}
@ -554,6 +558,7 @@ void OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_low_processor_usage_mode_sleep_usec"), &OS::get_low_processor_usage_mode_sleep_usec);
ClassDB::bind_method(D_METHOD("get_processor_count"), &OS::get_processor_count);
ClassDB::bind_method(D_METHOD("get_processor_name"), &OS::get_processor_name);
ClassDB::bind_method(D_METHOD("get_executable_path"), &OS::get_executable_path);
ClassDB::bind_method(D_METHOD("execute", "path", "arguments", "output", "read_stderr", "open_console"), &OS::execute, DEFVAL(Array()), DEFVAL(false), DEFVAL(false));