Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d566ce3a authored by Andy McFadden's avatar Andy McFadden
Browse files

Improve error message

The previous message indicated that the fault was due to an already-
connected window, which was misleading at times.

Bug 12439318

Change-Id: I1e0a042673dd245d1b0d237af963c52946803eb6
parent 52467257
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -408,9 +408,11 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config,
    if (dp) {
        EGLDisplay iDpy = dp->disp.dpy;

        if (native_window_api_connect(window, NATIVE_WINDOW_API_EGL) != OK) {
            ALOGE("EGLNativeWindowType %p already connected to another API",
                    window);
        int result = native_window_api_connect(window, NATIVE_WINDOW_API_EGL);
        if (result != OK) {
            ALOGE("eglCreateWindowSurface: native_window_api_connect (win=%p) "
                    "failed (%#x) (already connected to another API?)",
                    window, result);
            return setError(EGL_BAD_ALLOC, EGL_NO_SURFACE);
        }