summaryrefslogtreecommitdiff
path: root/libkms++/helpers.cpp
blob: 7746bdefdb88989bec597ad7e84862fd5d4e1e25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;
}
}