Mercurial > sdl-ios-xcode
annotate src/video/Xext/extensions/xme.h @ 1554:0ca607a5d173
Fixed bug #84
Date: Sun, 23 Oct 2005 16:39:03 +0200
From: "A. Schmid" <sahib@phreaker.net>
Subject: [SDL] no software surfaces with svgalib driver?
Hi,
I noticed that the SDL (1.2.9) svgalib driver only makes use of linear
addressable (framebuffer) video modes. On older systems (like one of
mine), linear addressable modes are often not available.
Especially for cards with VESA VBE < 2.0 the svgalib vesa driver is
unusable, since VESA only supports framebuffering for VBE 2.0 and later.
The changes necessary to add support for software surfaces seem to be
relatively small. I only had to hack src/video/svga/SDL_svgavideo.c (see
attached patch). The code worked fine for me, but it is no more than a
proof of concept and should be reviewed (probably has a memory leak when
switching modes). It also uses the vgagl library (included in the
svgalib package) and needs to be linked against it.
-Alex
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 19 Mar 2006 12:04:40 +0000 |
parents | caf0328c8058 |
children | 782fd950bd46 c121d94672cb a10bddfdc40f |
rev | line source |
---|---|
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
1 /* |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
2 * Copyright 1993-2001 by Xi Graphics, Inc. |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
3 * All Rights Reserved. |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
4 * |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
5 * Please see the LICENSE file accompanying this distribution for licensing |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
6 * information. |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
7 * |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
8 * Please send any bug fixes and modifications to src@xig.com. |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
9 * |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
10 * $XiGId: xme.h,v 1.1.1.1 2001/11/19 19:01:10 jon Exp $ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
11 * |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
12 */ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
13 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
14 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
15 #ifndef _XME_H_INCLUDED |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
16 #define _XME_H_INCLUDED |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
17 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
18 typedef struct { |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
19 short x; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
20 short y; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
21 unsigned short w; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
22 unsigned short h; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
23 } XiGMiscViewInfo; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
24 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
25 typedef struct { |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
26 unsigned short width; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
27 unsigned short height; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
28 int refresh; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
29 } XiGMiscResolutionInfo; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
30 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
31 extern Bool XiGMiscQueryVersion(Display *dpy, int *major, int *minor); |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
32 extern int XiGMiscQueryViews(Display *dpy, int screen, |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
33 XiGMiscViewInfo **pviews); |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
34 extern int XiGMiscQueryResolutions(Display *dpy, int screen, int view, |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
35 int *pactive, |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
36 XiGMiscResolutionInfo **presolutions); |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
37 extern void XiGMiscChangeResolution(Display *dpy, int screen, int view, |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
38 int width, int height, int refresh); |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
39 #endif /* _XME_H_INCLUDED */ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
40 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
41 |