From da5a4440f019074e7aa61c5531c5c61755adc44d Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Thu, 31 Mar 2011 20:59:58 -0700 Subject: ANativeWindow_setBuffersGeometry now returns proper error codes Change-Id: Iac59d513fa1d4a55b8378000714d344ef3e2e0a4 --- native/android/native_window.cpp | 3 +-- native/include/android/native_window.h | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'native') diff --git a/native/android/native_window.cpp b/native/android/native_window.cpp index ae1993d..8d42edb 100644 --- a/native/android/native_window.cpp +++ b/native/android/native_window.cpp @@ -68,8 +68,7 @@ int32_t ANativeWindow_getFormat(ANativeWindow* window) { int32_t ANativeWindow_setBuffersGeometry(ANativeWindow* window, int32_t width, int32_t height, int32_t format) { - native_window_set_buffers_geometry(window, width, height, format); - return 0; + return native_window_set_buffers_geometry(window, width, height, format); } int32_t ANativeWindow_lock(ANativeWindow* window, ANativeWindow_Buffer* outBuffer, diff --git a/native/include/android/native_window.h b/native/include/android/native_window.h index f3d7550..337fa96 100644 --- a/native/include/android/native_window.h +++ b/native/include/android/native_window.h @@ -95,6 +95,9 @@ int32_t ANativeWindow_getFormat(ANativeWindow* window); * * For all of these parameters, if 0 is supplied then the window's base * value will come back in force. + * + * width and height must be either both zero or both non-zero. + * */ int32_t ANativeWindow_setBuffersGeometry(ANativeWindow* window, int32_t width, int32_t height, int32_t format); -- cgit v1.1