Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/fbdev/fb_backend.cpp
Show First 20 Lines • Show All 270 Lines • ▼ Show 20 Line(s) | 270 | { | |||
---|---|---|---|---|---|
271 | return m_outputs; | 271 | return m_outputs; | ||
272 | } | 272 | } | ||
273 | 273 | | |||
274 | Outputs FramebufferBackend::enabledOutputs() const | 274 | Outputs FramebufferBackend::enabledOutputs() const | ||
275 | { | 275 | { | ||
276 | return m_outputs; | 276 | return m_outputs; | ||
277 | } | 277 | } | ||
278 | 278 | | |||
279 | bool FramebufferBackend::canLoad() | ||||
280 | { | ||||
281 | // try to open framebuffer almost the same way as in openFrameBuffer() | ||||
282 | const QString framebufferDevice = QString(Udev().primaryFramebuffer()->devNode()); | ||||
283 | int fd = open(framebufferDevice.toUtf8().constData(), O_RDWR | O_CLOEXEC); | ||||
284 | if (fd < 0) { | ||||
285 | return false; | ||||
286 | } | ||||
287 | close(fd); | ||||
288 | return true; | ||||
289 | } | ||||
290 | | ||||
279 | } | 291 | } |