egl/haiku: fix Mesa build under Haiku
Performing a goto crosses the initialization of 'BWindow* win' breaking the build. We also fix a missing semicolon.
This commit is contained in:
parent
089e7c3788
commit
e22e0de0d7
|
@ -92,8 +92,11 @@ haiku_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (!_eglInitSurface(&surface->surf, disp, EGL_WINDOW_BIT, conf, attrib_list))
|
||||
goto cleanup_surface;
|
||||
if (!_eglInitSurface(&surface->surf, disp, EGL_WINDOW_BIT,
|
||||
conf, attrib_list)) {
|
||||
free(surface);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
(&surface->surf)->SwapInterval = 1;
|
||||
|
||||
|
@ -110,10 +113,6 @@ haiku_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
|||
TRACE("Showing window\n");
|
||||
win->Show();
|
||||
return &surface->surf;
|
||||
|
||||
cleanup_surface:
|
||||
free(surface);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@ -139,7 +138,7 @@ haiku_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
|
|||
if (_eglPutSurface(surf)) {
|
||||
// XXX: detach haiku_egl_surface::gl from the native window and destroy it
|
||||
free(surf);
|
||||
}
|
||||
}
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
|
@ -153,7 +152,7 @@ haiku_add_configs_for_visuals(_EGLDisplay *dpy)
|
|||
conf = (struct haiku_egl_config*) calloc(1, sizeof (*conf));
|
||||
if (!conf) {
|
||||
_eglError(EGL_BAD_ALLOC, "haiku_add_configs_for_visuals");
|
||||
return NULL;
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
_eglInitConfig(&conf->base, dpy, 1);
|
||||
|
@ -210,6 +209,7 @@ cleanup:
|
|||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
extern "C"
|
||||
EGLBoolean
|
||||
init_haiku(_EGLDriver *drv, _EGLDisplay *dpy)
|
||||
|
@ -271,7 +271,7 @@ haiku_destroy_context(_EGLDriver* drv, _EGLDisplay *disp, _EGLContext* ctx)
|
|||
if (_eglPutContext(ctx)) {
|
||||
// XXX: teardown the context ?
|
||||
free(context);
|
||||
ctx = NULL
|
||||
ctx = NULL;
|
||||
}
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
@ -280,7 +280,7 @@ haiku_destroy_context(_EGLDriver* drv, _EGLDisplay *disp, _EGLContext* ctx)
|
|||
extern "C"
|
||||
EGLBoolean
|
||||
haiku_make_current(_EGLDriver* drv, _EGLDisplay* dpy, _EGLSurface *dsurf,
|
||||
_EGLSurface *rsurf, _EGLContext *ctx)
|
||||
_EGLSurface *rsurf, _EGLContext *ctx)
|
||||
{
|
||||
CALLED();
|
||||
|
||||
|
|
Loading…
Reference in New Issue