linuxfb: Pick the correct framebuffer device on Android

Try also /dev/graphics/fb0 in addition to /dev/fb0.

Change-Id: I9c7682af0c92ebdca806b7c9f60c67d4a732ff41
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
bb10
Laszlo Agocs 2013-10-11 13:42:15 +02:00 committed by The Qt Project
parent 99b20ce0b9
commit a662d42125
1 changed files with 9 additions and 2 deletions

View File

@ -341,8 +341,15 @@ bool QLinuxFbScreen::initialize(const QStringList &args)
userMmSize = QSize(mmSizeRx.cap(1).toInt(), mmSizeRx.cap(2).toInt());
}
if (fbDevice.isEmpty())
fbDevice = QLatin1String("/dev/fb0"); // ## auto-detect
if (fbDevice.isEmpty()) {
fbDevice = QLatin1String("/dev/fb0");
if (!QFile::exists(fbDevice))
fbDevice = QLatin1String("/dev/graphics/fb0");
if (!QFile::exists(fbDevice)) {
qWarning("Unable to figure out framebuffer device. Specify it manually.");
return false;
}
}
// Open the device
mFbFd = openFramebufferDevice(fbDevice);