summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9eb3db0)
raw | patch | inline | side by side (parent: 9eb3db0)
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Mon, 7 Dec 2015 18:06:09 +0000 (20:06 +0200) | ||
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Tue, 12 Jan 2016 12:52:37 +0000 (14:52 +0200) |
libkms++/connector.cpp | patch | blob | history | |
libkms++/connector.h | patch | blob | history |
diff --git a/libkms++/connector.cpp b/libkms++/connector.cpp
index cdeb02aa166e65967d2bb10a6284c9d6069f10f7..325b610de036fec57421d09c2f523442d580a883 100644 (file)
--- a/libkms++/connector.cpp
+++ b/libkms++/connector.cpp
throw invalid_argument(mode + ": mode not found");
}
-Videomode Connector::get_mode(unsigned xres, unsigned yres, unsigned refresh) const
+Videomode Connector::get_mode(unsigned xres, unsigned yres, unsigned refresh, bool ilace) const
{
auto c = m_priv->drm_connector;
@@ -125,6 +125,9 @@ Videomode Connector::get_mode(unsigned xres, unsigned yres, unsigned refresh) co
if (refresh && m.vrefresh != refresh)
continue;
+ if (ilace != !!(m.flags & DRM_MODE_FLAG_INTERLACE))
+ continue;
+
return drm_mode_to_video_mode(c->modes[i]);
}
diff --git a/libkms++/connector.h b/libkms++/connector.h
index cc04d522279e91941922c7e95ebdf0ce5193a95f..1759af1963becabcda17e59c83fed9468f3ad800 100644 (file)
--- a/libkms++/connector.h
+++ b/libkms++/connector.h
Videomode get_default_mode() const;
Videomode get_mode(const std::string& mode) const;
- Videomode get_mode(unsigned xres, unsigned yres, unsigned refresh) const;
+ Videomode get_mode(unsigned xres, unsigned yres, unsigned refresh, bool ilace) const;
Crtc* get_current_crtc() const;
std::vector<Crtc*> get_possible_crtcs() const;