summaryrefslogtreecommitdiff
path: root/libkms++/helpers.cpp
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@iki.fi>2015-09-28 01:13:34 +0300
committerTomi Valkeinen <tomi.valkeinen@iki.fi>2015-09-28 01:13:34 +0300
commit009828beac9bfe9c36d336a4de0d297f90aece52 (patch)
tree3ea6b22f2036dcc0c23c459ce53bfc2ad282e3e7 /libkms++/helpers.cpp
Initial version
Diffstat (limited to 'libkms++/helpers.cpp')
-rw-r--r--libkms++/helpers.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/libkms++/helpers.cpp b/libkms++/helpers.cpp
new file mode 100644
index 0000000..7746bde
--- /dev/null
+++ b/libkms++/helpers.cpp
@@ -0,0 +1,23 @@
+
+#include "connector.h"
+#include "helpers.h"
+#include <cstring>
+
+namespace kms
+{
+Videomode drm_mode_to_video_mode(const drmModeModeInfo& drmmode)
+{
+ // XXX these are the same at the moment
+ Videomode mode;
+ memcpy(&mode, &drmmode, sizeof(mode));
+ return mode;
+}
+
+drmModeModeInfo video_mode_to_drm_mode(const Videomode& mode)
+{
+ // XXX these are the same at the moment
+ drmModeModeInfo drmmode;
+ memcpy(&drmmode, &mode, sizeof(drmmode));
+ return drmmode;
+}
+}