diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-11-13 22:18:33 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-11-13 23:10:00 +0200 |
commit | ac362f919a2376bac1f7fd4c96f04edf24f30cff (patch) | |
tree | d77b8996aac7f7edb74bc687a011f39262e72118 /libkms++ | |
parent | 98773593e11a399dcfe3cf0656dca5022a9b2547 (diff) |
Connector: prettier connector names
Diffstat (limited to 'libkms++')
-rw-r--r-- | libkms++/connector.cpp | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/libkms++/connector.cpp b/libkms++/connector.cpp index 5a6fdd9..cdeb02a 100644 --- a/libkms++/connector.cpp +++ b/libkms++/connector.cpp @@ -14,25 +14,23 @@ namespace kms static const map<int, string> connector_names = { -#define DEF_CONN(c) { DRM_MODE_CONNECTOR_##c, #c } - DEF_CONN(Unknown), - DEF_CONN(VGA), - DEF_CONN(DVII), - DEF_CONN(DVID), - DEF_CONN(DVIA), - DEF_CONN(Composite), - DEF_CONN(SVIDEO), - DEF_CONN(LVDS), - DEF_CONN(Component), - DEF_CONN(9PinDIN), - DEF_CONN(DisplayPort), - DEF_CONN(HDMIA), - DEF_CONN(HDMIB), - DEF_CONN(TV), - DEF_CONN(eDP), - DEF_CONN(VIRTUAL), - DEF_CONN(DSI), -#undef DEF_CONN + { DRM_MODE_CONNECTOR_Unknown, "Unknown" }, + { DRM_MODE_CONNECTOR_VGA, "VGA" }, + { DRM_MODE_CONNECTOR_DVII, "DVI-I" }, + { DRM_MODE_CONNECTOR_DVID, "DVI-D" }, + { DRM_MODE_CONNECTOR_DVIA, "DVI-A" }, + { DRM_MODE_CONNECTOR_Composite, "Composite" }, + { DRM_MODE_CONNECTOR_SVIDEO, "S-Video" }, + { DRM_MODE_CONNECTOR_LVDS, "LVDS" }, + { DRM_MODE_CONNECTOR_Component, "Component" }, + { DRM_MODE_CONNECTOR_9PinDIN, "9-Pin-DIN" }, + { DRM_MODE_CONNECTOR_DisplayPort, "DP" }, + { DRM_MODE_CONNECTOR_HDMIA, "HDMI-A" }, + { DRM_MODE_CONNECTOR_HDMIB, "HDMI-B" }, + { DRM_MODE_CONNECTOR_TV, "TV" }, + { DRM_MODE_CONNECTOR_eDP, "eDP" }, + { DRM_MODE_CONNECTOR_VIRTUAL, "Virtual" }, + { DRM_MODE_CONNECTOR_DSI, "DSI" }, }; static const map<int, string> connection_str = { @@ -67,7 +65,7 @@ Connector::Connector(Card &card, uint32_t id, uint32_t idx) assert(m_priv->drm_connector); const auto& name = connector_names.at(m_priv->drm_connector->connector_type); - m_fullname = name + to_string(m_priv->drm_connector->connector_type_id); + m_fullname = name + "-" + to_string(m_priv->drm_connector->connector_type_id); } |