wayland/opengl: instead of just breaking, select the one with the lowest visual ID specifically
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
This commit is contained in:
parent
86286a0420
commit
ddca432762
1 changed files with 15 additions and 4 deletions
|
|
@ -239,6 +239,9 @@ static int wcreate(MwWidget handle) {
|
||||||
EGLDisplay display;
|
EGLDisplay display;
|
||||||
waylandopengl_t* o = r = malloc(sizeof(*o));
|
waylandopengl_t* o = r = malloc(sizeof(*o));
|
||||||
int gbm_format = 0;
|
int gbm_format = 0;
|
||||||
|
MwBool egl_config_type_set = MwFALSE;
|
||||||
|
int egl_config_type = 0;
|
||||||
|
int known_egl_config_type = 0;
|
||||||
EGLConfig egl_configs[1024];
|
EGLConfig egl_configs[1024];
|
||||||
memset(o, 0, sizeof(waylandopengl_t));
|
memset(o, 0, sizeof(waylandopengl_t));
|
||||||
|
|
||||||
|
|
@ -344,10 +347,18 @@ static int wcreate(MwWidget handle) {
|
||||||
&gbm_format) == EGL_FALSE) {
|
&gbm_format) == EGL_FALSE) {
|
||||||
printf("ERROR: eglGetConfigAttrib, %0X\n", eglGetError());
|
printf("ERROR: eglGetConfigAttrib, %0X\n", eglGetError());
|
||||||
} else {
|
} else {
|
||||||
if(gbm_format == GBM_FORMAT_ARGB8888) {
|
if(gbm_format == GBM_FORMAT_ARGB8888) {
|
||||||
o->egl_config = egl_configs[i];
|
if(o->eglGetConfigAttrib(display, egl_configs[i],
|
||||||
break;
|
EGL_NATIVE_VISUAL_TYPE,
|
||||||
}
|
&egl_config_type) == EGL_FALSE) {
|
||||||
|
printf("ERROR: eglGetConfigAttrib, %0X\n", eglGetError());
|
||||||
|
} else {
|
||||||
|
if(egl_config_type < known_egl_config_type || !egl_config_type_set) {
|
||||||
|
o->egl_config = egl_configs[i];
|
||||||
|
egl_config_type_set = MwTRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue