am 834eb602: Fix bug in native activity demo.

Merge commit '834eb602ebd904ec1cd6b5301106c97e67693b4c' into gingerbread-plus-aosp

* commit '834eb602ebd904ec1cd6b5301106c97e67693b4c':
  Fix bug in native activity demo.
This commit is contained in:
Dianne Hackborn
2010-10-19 18:42:23 -07:00
committed by Android Git Automerger

View File

@@ -74,14 +74,15 @@ static int engine_init_display(struct engine* engine) {
selectConfigForNativeWindow(display, attribs, engine->app->window, &config);
surface = eglCreateWindowSurface(display, config, engine->app->window, NULL);
context = eglCreateContext(display, config, NULL, NULL);
eglQuerySurface(display, surface, EGL_WIDTH, &w);
eglQuerySurface(display, surface, EGL_HEIGHT, &h);
if (eglMakeCurrent(display, surface, surface, context) == EGL_FALSE) {
LOGW("Unable to eglMakeCurrent");
return -1;
}
eglQuerySurface(display, surface, EGL_WIDTH, &w);
eglQuerySurface(display, surface, EGL_HEIGHT, &h);
engine->display = display;
engine->context = context;
engine->surface = surface;