Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @@ -234,6 +236,10 @@ static ALLEGRO_EXTRA_DISPLAY_SETTINGS** get_visuals_new(ALLEGRO_DISPLAY_XGLX *gl
- ALLEGRO_INFO("%i formats.\n", num_fbconfigs);
- + Display *dpy = system->gfxdisplay;
- + XVisualInfo *visual;
- + XRenderPictFormat *pict_format;
- +
- for (i = j = 0; i < num_fbconfigs; i++) {
- ALLEGRO_DEBUG("-- \n");
- ALLEGRO_DEBUG("Decoding visual no. %i...\n", i);
- @@ -243,6 +249,23 @@ static ALLEGRO_EXTRA_DISPLAY_SETTINGS** get_visuals_new(ALLEGRO_DISPLAY_XGLX *gl
- #ifdef DEBUGMODE
- display_pixel_format(eds[j]);
- #endif
- +
- + visual = (XVisualInfo*) glXGetVisualFromFBConfig(dpy, fbconfig[i]);
- + if (!visual) {
- + al_free(eds[j]);
- + continue;
- + }
- +
- + pict_format = XRenderFindVisualFormat(dpy, visual->visual);
- + if (!pict_format) {
- + al_free(eds[j]);
- + continue;
- + }
- + if (pict_format->direct.alphaMask <= 0) {
- + al_free(eds[j]);
- + continue;
- + }
- +
- eds[j]->score = _al_score_display_settings(eds[j], ref);
- if (eds[j]->score == -1) {
- al_free(eds[j]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement