diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-12-07 20:06:09 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-01-12 14:52:37 +0200 |
commit | c47f147de78d4005ea1117e01a8bcc2d9f4c6d1e (patch) | |
tree | 75cd39caa685f55ae86e04fb403f9c1c613bc269 /libkms++ | |
parent | 9eb3db0f74f005441ce8ff4554a82e1cea91527f (diff) |
libkms: add 'ilace' param for Connector::get_mode()
Diffstat (limited to 'libkms++')
-rw-r--r-- | libkms++/connector.cpp | 5 | ||||
-rw-r--r-- | libkms++/connector.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/libkms++/connector.cpp b/libkms++/connector.cpp index cdeb02a..325b610 100644 --- a/libkms++/connector.cpp +++ b/libkms++/connector.cpp @@ -112,7 +112,7 @@ Videomode Connector::get_mode(const string& mode) const 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 cc04d52..1759af1 100644 --- a/libkms++/connector.h +++ b/libkms++/connector.h @@ -17,7 +17,7 @@ public: 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; |