Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/fbdev/fb_backend.cpp
Show First 20 Lines • Show All 120 Lines • ▼ Show 20 Line(s) | 116 | { | |||
---|---|---|---|---|---|
121 | fb_var_screeninfo varinfo; | 121 | fb_var_screeninfo varinfo; | ||
122 | fb_fix_screeninfo fixinfo; | 122 | fb_fix_screeninfo fixinfo; | ||
123 | 123 | | |||
124 | // Probe the device for screen information. | 124 | // Probe the device for screen information. | ||
125 | if (ioctl(m_fd, FBIOGET_FSCREENINFO, &fixinfo) < 0 || ioctl(m_fd, FBIOGET_VSCREENINFO, &varinfo) < 0) { | 125 | if (ioctl(m_fd, FBIOGET_FSCREENINFO, &fixinfo) < 0 || ioctl(m_fd, FBIOGET_VSCREENINFO, &varinfo) < 0) { | ||
126 | return false; | 126 | return false; | ||
127 | } | 127 | } | ||
128 | 128 | | |||
129 | // correct the color info, and try to turn on screens, assuming this is a non-primary framebuffer device | 129 | // Activate the framebuffer device, assuming this is a non-primary framebuffer device | ||
130 | varinfo.grayscale = 0; | 130 | varinfo.activate = FB_ACTIVATE_NOW | FB_ACTIVATE_FORCE; | ||
131 | varinfo.transp.offset = 24; | | |||
132 | varinfo.transp.length = 8; | | |||
133 | varinfo.transp.msb_right = 0; | | |||
134 | varinfo.red.offset = 16; | | |||
135 | varinfo.red.length = 8; | | |||
136 | varinfo.red.msb_right = 0; | | |||
137 | varinfo.green.offset = 8; | | |||
138 | varinfo.green.length = 8; | | |||
139 | varinfo.green.msb_right = 0; | | |||
140 | varinfo.blue.offset = 0; | | |||
141 | varinfo.blue.length = 8; | | |||
142 | varinfo.blue.msb_right = 0; | | |||
143 | ioctl(m_fd, FBIOPUT_VSCREENINFO, &varinfo); | 131 | ioctl(m_fd, FBIOPUT_VSCREENINFO, &varinfo); | ||
144 | 132 | | |||
145 | // Probe the device for new screen information. | 133 | // Probe the device for new screen information. | ||
146 | if (ioctl(m_fd, FBIOGET_VSCREENINFO, &varinfo) < 0) { | 134 | if (ioctl(m_fd, FBIOGET_VSCREENINFO, &varinfo) < 0) { | ||
147 | return false; | 135 | return false; | ||
148 | } | 136 | } | ||
149 | 137 | | |||
150 | m_resolution = QSize(varinfo.xres, varinfo.yres); | 138 | m_resolution = QSize(varinfo.xres, varinfo.yres); | ||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |