From a86f0e1da10204109c00e9499acf04f188c43a6d Mon Sep 17 00:00:00 2001 From: David Klingenberg Date: Tue, 22 Apr 2025 16:46:43 +0200 Subject: [PATCH] Add 0.0.0.0 to server IP combo box, allow listening on all IPs (#1612) --- LibreHardwareMonitor/UI/InterfacePortForm.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/LibreHardwareMonitor/UI/InterfacePortForm.cs b/LibreHardwareMonitor/UI/InterfacePortForm.cs index c02d6c8..54b050b 100644 --- a/LibreHardwareMonitor/UI/InterfacePortForm.cs +++ b/LibreHardwareMonitor/UI/InterfacePortForm.cs @@ -36,16 +36,15 @@ public partial class InterfacePortForm : Form if (ip.AddressFamily == AddressFamily.InterNetwork) interfaceComboBox.Items.Add(ip.ToString()); } + + interfaceComboBox.Items.Add("0.0.0.0"); + // select the last one by default to match the existing behavior if (interfaceComboBox.Items.Count > 0) { interfaceComboBox.SelectedIndex = interfaceComboBox.Items.Count - 1; - } else - { - // default to ? just like previous version - interfaceComboBox.Items.Add("?"); - interfaceComboBox.SelectedIndex = 0; } + // check to see if the selected listener IP is in our list. if (interfaceComboBox.Items.Contains(selectedListenerIp)) {