summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2019-09-24 12:52:14 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2019-09-25 14:49:06 +0300
commit40bc9d1095228ab1377625be3479491263d696d7 (patch)
tree68e02263767217c5302788a7c974c3786fb9e44b /py
parentf887436cebefd30f2bfadcfb7210703baa8ca93c (diff)
videomode to_string improvements
Add to_string_short() and to_string_long() to videomode (using the fmt library) for easy printing of videomodes. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'py')
-rw-r--r--py/pykms/pykmsbase.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/py/pykms/pykmsbase.cpp b/py/pykms/pykmsbase.cpp
index 668e6e3..b4dc090 100644
--- a/py/pykms/pykmsbase.cpp
+++ b/py/pykms/pykmsbase.cpp
@@ -229,6 +229,9 @@ void init_pykmsbase(py::module &m)
.def_property("hsync", &Videomode::hsync, &Videomode::set_hsync)
.def_property("vsync", &Videomode::vsync, &Videomode::set_vsync)
+
+ .def("to_string_short", &Videomode::to_string_short)
+ .def("to_string_long", &Videomode::to_string_long)
;