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

Commit 6b1f4100 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

added NATIVE_WINDOW_FORMAT attribute to android_native_window_t

parent 1c3561e8
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -63,7 +63,8 @@ struct android_native_base_t
/* attributes queriable with query() */
/* attributes queriable with query() */
enum {
enum {
    NATIVE_WINDOW_WIDTH     = 0,
    NATIVE_WINDOW_WIDTH     = 0,
    NATIVE_WINDOW_HEIGHT    = 1
    NATIVE_WINDOW_HEIGHT    = 1,
    NATIVE_WINDOW_FORMAT    = 2,
};
};


struct android_native_window_t 
struct android_native_window_t 
+3 −0
Original line number Original line Diff line number Diff line
@@ -212,6 +212,9 @@ int FramebufferNativeWindow::query(android_native_window_t* window,
        case NATIVE_WINDOW_HEIGHT:
        case NATIVE_WINDOW_HEIGHT:
            *value = fb->height;
            *value = fb->height;
            return NO_ERROR;
            return NO_ERROR;
        case NATIVE_WINDOW_FORMAT:
            *value = fb->format;
            return NO_ERROR;
    }
    }
    return BAD_VALUE;
    return BAD_VALUE;
}
}
+3 −0
Original line number Original line Diff line number Diff line
@@ -620,6 +620,9 @@ int Surface::query(int what, int* value)
        case NATIVE_WINDOW_HEIGHT:
        case NATIVE_WINDOW_HEIGHT:
            *value = int(mHeight);
            *value = int(mHeight);
            return NO_ERROR;
            return NO_ERROR;
        case NATIVE_WINDOW_FORMAT:
            *value = int(mFormat);
            return NO_ERROR;
    }
    }
    return BAD_VALUE;
    return BAD_VALUE;
}
}