diff options
Diffstat (limited to 'src/glx/applegl_glx.c')
-rw-r--r-- | src/glx/applegl_glx.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/glx/applegl_glx.c b/src/glx/applegl_glx.c index 72fd985178..d14adcb0e2 100644 --- a/src/glx/applegl_glx.c +++ b/src/glx/applegl_glx.c @@ -181,12 +181,20 @@ applegl_create_screen(int screen, struct glx_display * priv) return psc; } -_X_HIDDEN int +_X_HIDDEN __GLXDRIdisplay * applegl_create_display(struct glx_display *glx_dpy) { - if(!apple_init_glx(glx_dpy->dpy)) - return 1; + struct __GLXDRIdisplay *pdpyp; - return GLXBadContext; -} + if (!apple_init_glx(glx_dpy->dpy)) + return NULL; + + pdpyp = malloc(sizeof *pdpyp); + if (pdpyp == NULL) + return NULL; + + pdpyp->destroyDisplay = apple_destroy_display; + pdpyp->createScreen = applegl_create_screen; + return &pdpyp->base; +} |