diff src/video/directfb/SDL_DirectFB_opengl.c @ 3023:d72a0dd80e8b

DirectFB cleanups & simple window manager - use SDL_getenv, not getenv ... - no more support for 0.9.25 - not even mentioned any longer on directfb.org - fix fullscreen issues - add a simple window manager unless the directfb team comes up with a working wm. The driver has support for a very, very basic window manager you may want to use when runnning with "wm=default". Use export SDL_DIRECTFB_WM=1 to enable basic window borders including icon support. In order to have the window title rendered, you need to have the following font installed: /usr/share/fonts/truetype/freefont/FreeSans.ttf
author Couriersud <couriersud@arcor.de>
date Sun, 11 Jan 2009 23:49:23 +0000
parents 8cc00819c8d6
children f7b03b6838cb
line wrap: on
line diff
--- a/src/video/directfb/SDL_DirectFB_opengl.c	Sun Jan 11 23:39:11 2009 +0000
+++ b/src/video/directfb/SDL_DirectFB_opengl.c	Sun Jan 11 23:49:23 2009 +0000
@@ -173,8 +173,8 @@
 
     SDL_DFB_CALLOC(context, 1, sizeof(*context));
 
-    SDL_DFB_CHECKERR(windata->surface->
-                     GetGL(windata->surface, &context->context));
+    SDL_DFB_CHECKERR(windata->surface->GetGL(windata->surface,
+                                             &context->context));
 
     if (!context->context)
         return NULL;
@@ -208,16 +208,9 @@
         p->context->Unlock(p->context);
 
     if (windata) {
-        int cw, ch;
-
         windata->gl_context = NULL;
         /* Everything is unlocked, check for a resize */
-        SDL_DFB_CHECKERR(windata->surface->
-                         GetSize(windata->surface, &cw, &ch));
-        if (cw != window->w || ch != window->h)
-            SDL_DFB_CHECKERR(windata->window->
-                             ResizeSurface(windata->window, window->w,
-                                           window->h));
+        DirectFB_AdjustWindowSurface(window);
     }
 
     if (ctx != NULL) {
@@ -266,8 +259,8 @@
 
     if (1 || windata->gl_context) {
         /* SDL_DFB_CHECKERR(windata->gl_context->context->Unlock(windata->gl_context->context)); */
-        SDL_DFB_CHECKERR(windata->surface->
-                         Flip(windata->surface, &region, DSFLIP_ONSYNC));
+        SDL_DFB_CHECKERR(windata->surface->Flip(windata->surface, &region,
+                                                DSFLIP_ONSYNC));
         /* SDL_DFB_CHECKERR(windata->gl_context->context->Lock(windata->gl_context->context)); */
 
     }