summaryrefslogtreecommitdiff
path: root/libkms++
diff options
context:
space:
mode:
Diffstat (limited to 'libkms++')
-rw-r--r--libkms++/connector.cpp5
-rw-r--r--libkms++/connector.h2
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;