From 009828beac9bfe9c36d336a4de0d297f90aece52 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Mon, 28 Sep 2015 01:13:34 +0300 Subject: Initial version --- libkms++/helpers.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 libkms++/helpers.cpp (limited to 'libkms++/helpers.cpp') 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 + +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; +} +} -- cgit v1.2.3