142 |
|
// Set VideoMonitor according to video mode |
143 |
|
void set_video_monitor(int width, int height, int bytes_per_row, bool native_byte_order) |
144 |
|
{ |
145 |
< |
int layout; |
145 |
> |
int layout = FLAYOUT_DIRECT; |
146 |
|
switch (depth) { |
147 |
|
case 1: |
148 |
|
layout = FLAYOUT_DIRECT; |
470 |
|
|
471 |
|
#if ENABLE_DGA |
472 |
|
// DGA available? |
473 |
< |
int dga_flags = 0; |
474 |
< |
XF86DGAQueryDirectVideo(x_display, screen, &dga_flags); |
475 |
< |
has_dga = dga_flags & XF86DGADirectPresent; |
473 |
> |
int event_base, error_base; |
474 |
> |
if (XF86DGAQueryExtension(x_display, &event_base, &error_base)) { |
475 |
> |
int dga_flags = 0; |
476 |
> |
XF86DGAQueryDirectVideo(x_display, screen, &dga_flags); |
477 |
> |
has_dga = dga_flags & XF86DGADirectPresent; |
478 |
> |
} else |
479 |
> |
has_dga = false; |
480 |
|
#endif |
481 |
|
|
482 |
|
// Find black and white colors |