Consider the case where an attribute is set to EGL_DONT_CARE in eglChooseConfig
authorGabriel Jacobo <gabomdq@gmail.com>
Fri, 26 Jul 2013 12:37:36 -0300
changeset 752024fd80e8baaf
parent 7519 b9ef4591d6b5
child 7521 03bca9a4180d
Consider the case where an attribute is set to EGL_DONT_CARE in eglChooseConfig
SDL doesn't currently use EGL_DONT_CARE, but it doesn' hurt to future proof.
android-project/src/org/libsdl/app/SDLActivity.java
     1.1 --- a/android-project/src/org/libsdl/app/SDLActivity.java	Fri Jul 26 12:22:40 2013 -0300
     1.2 +++ b/android-project/src/org/libsdl/app/SDLActivity.java	Fri Jul 26 12:37:36 2013 -0300
     1.3 @@ -343,12 +343,12 @@
     1.4                          if (attribs[j] == EGL10.EGL_NONE)
     1.5                              break;
     1.6  
     1.7 -                        if (attribs[j] == EGL10.EGL_RED_SIZE ||
     1.8 +                        if (attribs[j+1] != EGL10.EGL_DONT_CARE && (attribs[j] == EGL10.EGL_RED_SIZE ||
     1.9                              attribs[j] == EGL10.EGL_GREEN_SIZE ||
    1.10                              attribs[j] == EGL10.EGL_BLUE_SIZE ||
    1.11                              attribs[j] == EGL10.EGL_ALPHA_SIZE ||
    1.12                              attribs[j] == EGL10.EGL_DEPTH_SIZE ||
    1.13 -                            attribs[j] == EGL10.EGL_STENCIL_SIZE) {
    1.14 +                            attribs[j] == EGL10.EGL_STENCIL_SIZE)) {
    1.15                              egl.eglGetConfigAttrib(dpy, configs[i], attribs[j], value);
    1.16                              bitdiff += value[0] - attribs[j + 1]; // value is always >= attrib
    1.17                          }