From 5f623865c6498741a9dea577a74ca78c728e6ecf Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 16 Mar 2022 02:58:29 +0100 Subject: [PATCH] Hide the video driver switch button if there is only one option. --- editor/editor_node.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index b5b1c501c..b724494ed 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -6399,6 +6399,10 @@ EditorNode::EditorNode() { _update_video_driver_color(); + if (video_drivers.get_slice_count(",") < 2) { + video_driver->hide(); + } + video_restart_dialog = memnew(ConfirmationDialog); video_restart_dialog->set_text(TTR("Changing the video driver requires restarting the editor.")); video_restart_dialog->get_ok()->set_text(TTR("Save & Restart"));