Display CPU and GPU model name in the editor visual profiler

This shows the information from the remote device, which will typically
differ from the local device in remote debugging scenarios.
This commit is contained in:
Hugo Locurcio 2024-11-11 19:51:54 +01:00
parent 0f5f3bc954
commit 3e8a24d0da
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
4 changed files with 22 additions and 2 deletions

View file

@ -370,6 +370,12 @@ class ServersDebugger::VisualProfiler : public EngineProfiler {
public:
void toggle(bool p_enable, const Array &p_opts) {
RS::get_singleton()->set_frame_profiling_enabled(p_enable);
// Send hardware information from the remote device so that it's accurate for remote debugging.
Array hardware_info;
hardware_info.push_back(OS::get_singleton()->get_processor_name());
hardware_info.push_back(RenderingServer::get_singleton()->get_video_adapter_name());
EngineDebugger::get_singleton()->send_message("visual:hardware_info", hardware_info);
}
void add(const Array &p_data) {}