diff options
-rw-r--r-- | libkms++/card.cpp | 11 | ||||
-rw-r--r-- | libkms++/card.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/libkms++/card.cpp b/libkms++/card.cpp index 63a068a..34dbc32 100644 --- a/libkms++/card.cpp +++ b/libkms++/card.cpp @@ -182,6 +182,17 @@ vector<Connector*> Card::get_connectors() const return v; } +vector<Crtc*> Card::get_crtcs() const +{ + vector<Crtc*> v; + for(auto pair : m_obmap) { + auto p = dynamic_cast<Crtc*>(pair.second); + if (p) + v.push_back(p); + } + return v; +} + vector<Plane*> Card::get_planes() const { vector<Plane*> v; diff --git a/libkms++/card.h b/libkms++/card.h index f35ba60..dc97703 100644 --- a/libkms++/card.h +++ b/libkms++/card.h @@ -37,6 +37,7 @@ public: void print_short() const; std::vector<Connector*> get_connectors() const; + std::vector<Crtc*> get_crtcs() const; std::vector<DrmObject*> get_objects() const; std::vector<Plane*> get_planes() const; |