~emersion/drmdb

df40d73f551129b4392539fe7b88eb69720550aa — Simon Ser 2 years ago e18dfe5
cmd/drmdump: hide size/subpixel if disconnected
1 files changed, 4 insertions(+), 2 deletions(-)

M cmd/drmdump/main.go
M cmd/drmdump/main.go => cmd/drmdump/main.go +4 -2
@@ 373,8 373,10 @@ func printConnectors(tf treefmt.Formatter, conns []drmtree.Connector) {
		tfc.Printf("Object ID: %v", conn.ID)
		tfc.Printf("Type: %v", conn.Type)
		tfc.Printf("Status: %v", conn.Status)
		tfc.Printf("Physical size: %vx%v mm", conn.PhyWidth, conn.PhyHeight)
		tfc.Printf("Subpixel: %v", conn.Subpixel)
		if conn.Status == drm.ConnectorStatusConnected {
			tfc.Printf("Physical size: %vx%v mm", conn.PhyWidth, conn.PhyHeight)
			tfc.Printf("Subpixel: %v", conn.Subpixel)
		}
		tfc.Printf("Encoders: %v", encoderIDsString(conn.Encoders))
		if len(conn.Modes) > 0 {
			tfc.Printf("Modes")