summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libkms++/atomicreq.cpp7
-rw-r--r--libkms++/atomicreq.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/libkms++/atomicreq.cpp b/libkms++/atomicreq.cpp
index 236e501..7794913 100644
--- a/libkms++/atomicreq.cpp
+++ b/libkms++/atomicreq.cpp
@@ -21,6 +21,8 @@ static inline int drmModeAtomicCommit(int, drmModeAtomicReqPtr, int, void*) { re
#endif // DRM_CLIENT_CAP_ATOMIC
+using namespace std;
+
namespace kms
{
AtomicReq::AtomicReq(Card& card)
@@ -47,6 +49,11 @@ void AtomicReq::add(DrmObject *ob, Property *prop, uint64_t value)
add(ob->id(), prop->id(), value);
}
+void AtomicReq::add(DrmObject* ob, const string& prop, uint64_t value)
+{
+ add(ob, m_card.get_prop(prop), value);
+}
+
int AtomicReq::test()
{
uint32_t flags = DRM_MODE_ATOMIC_TEST_ONLY;
diff --git a/libkms++/atomicreq.h b/libkms++/atomicreq.h
index 89797df..55dd7c9 100644
--- a/libkms++/atomicreq.h
+++ b/libkms++/atomicreq.h
@@ -1,6 +1,7 @@
#pragma once
#include <cstdint>
+#include <string>
struct _drmModeAtomicReq;
@@ -19,6 +20,7 @@ public:
void add(uint32_t ob_id, uint32_t prop_id, uint64_t value);
void add(DrmObject *ob, Property *prop, uint64_t value);
+ void add(DrmObject *ob, const std::string& prop, uint64_t value);
int test();
int commit(void* data);