diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-11 13:59:53 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-11 13:59:53 +0200 |
commit | 5aadc618b6ff152dbc0ca4ea901c34a97e164091 (patch) | |
tree | 91a2013ca64c62d815e69a3a03de5753c7241e0d /core | |
parent | d2a8f4d33dfafc850f90b4659ce0d971c2689ad2 (diff) | |
parent | de768afbdcf9dd6a588ac975bc56e3fd755091c2 (diff) |
Merge pull request #66102 from MJacred/feature/getvideoadapterdriverinfo
Fetch video adapter driver name and version from OS
Diffstat (limited to 'core')
-rw-r--r-- | core/core_bind.cpp | 6 | ||||
-rw-r--r-- | core/core_bind.h | 2 | ||||
-rw-r--r-- | core/os/os.h | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/core/core_bind.cpp b/core/core_bind.cpp index 7496ba1979..5d3afdac90 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -334,6 +334,10 @@ String OS::get_version() const { return ::OS::get_singleton()->get_version(); } +Vector<String> OS::get_video_adapter_driver_info() const { + return ::OS::get_singleton()->get_video_adapter_driver_info(); +} + Vector<String> OS::get_cmdline_args() { List<String> cmdline = ::OS::get_singleton()->get_cmdline_args(); Vector<String> cmdlinev; @@ -549,6 +553,8 @@ void OS::_bind_methods() { ClassDB::bind_method(D_METHOD("get_cmdline_args"), &OS::get_cmdline_args); ClassDB::bind_method(D_METHOD("get_cmdline_user_args"), &OS::get_cmdline_user_args); + ClassDB::bind_method(D_METHOD("get_video_adapter_driver_info"), &OS::get_video_adapter_driver_info); + ClassDB::bind_method(D_METHOD("set_restart_on_exit", "restart", "arguments"), &OS::set_restart_on_exit, DEFVAL(Vector<String>())); ClassDB::bind_method(D_METHOD("is_restart_on_exit_set"), &OS::is_restart_on_exit_set); ClassDB::bind_method(D_METHOD("get_restart_on_exit_arguments"), &OS::get_restart_on_exit_arguments); diff --git a/core/core_bind.h b/core/core_bind.h index 9261698076..c44785255b 100644 --- a/core/core_bind.h +++ b/core/core_bind.h @@ -196,6 +196,8 @@ public: Vector<String> get_cmdline_args(); Vector<String> get_cmdline_user_args(); + Vector<String> get_video_adapter_driver_info() const; + String get_locale() const; String get_locale_language() const; diff --git a/core/os/os.h b/core/os/os.h index 1a5e45968d..af7b40f3ec 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -123,6 +123,8 @@ public: int get_display_driver_id() const { return _display_driver_id; } + virtual Vector<String> get_video_adapter_driver_info() const = 0; + void print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, bool p_editor_notify = false, Logger::ErrorType p_type = Logger::ERR_ERROR); void print(const char *p_format, ...) _PRINTF_FORMAT_ATTRIBUTE_2_3; void print_rich(const char *p_format, ...) _PRINTF_FORMAT_ATTRIBUTE_2_3; |