1359 |
|
|
1360 |
|
#ifdef ENABLE_FBDEV_DGA |
1361 |
|
// FBDev available? |
1362 |
< |
if (!has_dga && local_X11) { |
1362 |
> |
bool has_fbdev_dga = false; |
1363 |
> |
if (local_X11) { |
1364 |
|
if ((fb_dev_fd = open("/dev/fb0", O_RDWR)) > 0) { |
1365 |
|
if (ioctl(fb_dev_fd, FBIOGET_VSCREENINFO, &fb_vinfo) != 0) |
1366 |
|
close(fb_dev_fd); |
1367 |
|
else { |
1368 |
< |
has_dga = true; |
1369 |
< |
is_fbdev_dga_mode = true; |
1368 |
> |
has_fbdev_dga = true; |
1369 |
> |
if (!has_dga) { |
1370 |
> |
// Fallback to FBDev DGA mode if XF86 DGA is not possible |
1371 |
> |
has_dga = true; |
1372 |
> |
is_fbdev_dga_mode = true; |
1373 |
> |
} |
1374 |
|
fb_orig_vinfo = fb_vinfo; |
1375 |
|
D(bug("Frame buffer device initial resolution: %dx%dx%d\n", fb_vinfo.xres, fb_vinfo.yres, fb_vinfo.bits_per_pixel)); |
1376 |
|
} |
1414 |
|
else if (has_dga && sscanf(mode_str, "dga/%d/%d", &default_width, &default_height) == 2) |
1415 |
|
display_type = DIS_SCREEN; |
1416 |
|
#endif |
1417 |
+ |
#ifdef ENABLE_FBDEV_DGA |
1418 |
+ |
else if (has_fbdev_dga && sscanf(mode_str, "fbdev/%d/%d", &default_width, &default_height) == 2) { |
1419 |
+ |
is_fbdev_dga_mode = true; |
1420 |
+ |
display_type = DIS_SCREEN; |
1421 |
+ |
} |
1422 |
+ |
#endif |
1423 |
|
if (display_type == DIS_INVALID) { |
1424 |
|
D(bug("Invalid screen mode specified, defaulting to old modes selection\n")); |
1425 |
|
mode_str = NULL; |
1687 |
|
free(fb_save); |
1688 |
|
fb_save = NULL; |
1689 |
|
} |
1679 |
– |
if (depth == 8) |
1680 |
– |
palette_changed = true; |
1690 |
|
|
1691 |
|
// Unlock frame buffer (and continue MacOS thread) |
1692 |
|
UNLOCK_FRAME_BUFFER; |