comparison src/video/directfb/SDL_DirectFB_modes.h @ 5202:164f20ba08eb

Updated the DirectFB support, from Couriersud attached is a working directfb driver diff which works with the current changes. There are a number of changes around it as well, e.g. configure.in. The directfb renderdriver right now still depends on a some "includes" from src/video/directfb. That's why it is not yet moved to the new render folder.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 05 Feb 2011 16:07:10 -0800
parents 25b9cd8bdc30
children b530ef003506
comparison
equal deleted inserted replaced
5201:7c3422025c35 5202:164f20ba08eb
16 License along with this library; if not, write to the Free Software 16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 18
19 Sam Lantinga 19 Sam Lantinga
20 slouken@libsdl.org 20 slouken@libsdl.org
21
22 SDL1.3 DirectFB driver by couriersud@arcor.de
23
21 */ 24 */
22 #include "SDL_config.h"
23 25
24 #ifndef _SDL_directfb_modes_h 26 #ifndef _SDL_directfb_modes_h
25 #define _SDL_directfb_modes_h 27 #define _SDL_directfb_modes_h
26 28
27 #include "SDL_DirectFB_video.h" 29 #include <directfb.h>
28 30
29 #define SDL_DFB_DISPLAYDATA(dev, win) DFB_DisplayData *dispdata = ((win && dev) ? (DFB_DisplayData *) (win)->display->driverdata : NULL) 31 #include "../SDL_sysvideo.h"
32
33 #define SDL_DFB_DISPLAYDATA(win) DFB_DisplayData *dispdata = ((win) ? (DFB_DisplayData *) (win)->display->driverdata : NULL)
30 34
31 typedef struct _DFB_DisplayData DFB_DisplayData; 35 typedef struct _DFB_DisplayData DFB_DisplayData;
32 struct _DFB_DisplayData 36 struct _DFB_DisplayData
33 { 37 {
34 IDirectFBDisplayLayer *layer; 38 IDirectFBDisplayLayer *layer;
35 DFBSurfacePixelFormat pixelformat; 39 DFBSurfacePixelFormat pixelformat;
36 /* FIXME: support for multiple video layer. 40 /* FIXME: support for multiple video layer.
37 * However, I do not know any card supporting 41 * However, I do not know any card supporting
38 * more than one 42 * more than one
39 */ 43 */
40 DFBDisplayLayerID vidID; 44 DFBDisplayLayerID vidID;
41 IDirectFBDisplayLayer *vidlayer; 45 IDirectFBDisplayLayer *vidlayer;
42 46
43 int vidIDinuse; 47 int vidIDinuse;
44 48
45 int cw; 49 int cw;
46 int ch; 50 int ch;
47 }; 51 };
48 52
49 53
50 extern void DirectFB_InitModes(_THIS); 54 extern void DirectFB_InitModes(_THIS);
51 extern void DirectFB_GetDisplayModes(_THIS, SDL_VideoDisplay * display); 55 extern void DirectFB_GetDisplayModes(_THIS, SDL_VideoDisplay * display);
52 extern int DirectFB_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode); 56 extern int DirectFB_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode);
53 extern void DirectFB_QuitModes(_THIS); 57 extern void DirectFB_QuitModes(_THIS);
54 58
59 extern void DirectFB_SetContext(_THIS, SDL_Window *window);
60
55 #endif /* _SDL_directfb_modes_h */ 61 #endif /* _SDL_directfb_modes_h */
56 62
57 /* vi: set ts=4 sw=4 expandtab: */ 63 /* vi: set ts=4 sw=4 expandtab: */