Commit a1db2482 authored by Sam Lantinga's avatar Sam Lantinga

Added SDL_LockRect() and SDL_UnlockRect()

 Incorporated XFree86 extension libraries into the source

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40293
parent 84075e73
......@@ -45,7 +45,7 @@ EXTRA_DIST = \
EpocBuildFiles.zip \
WhatsNew \
docs.html \
sdl.m4 \
sdl.m4 \
SDL.spec \
autogen.sh \
strip_fPIC.sh
......
......@@ -3,6 +3,12 @@ This is a list of API changes in SDL's version history.
Version 1.0:
1.2.4:
Added SDL_LockRect() and SDL_UnlockRect() to lock a portion of a
surface. This may be more efficient than a full lock if you are
using a hardware surface and plan to make a few changes to small
areas in the surface.
1.2.0:
Added SDL_VIDEOEXPOSE event to signal that the screen needs to
be redrawn. This is currently only delivered to OpenGL windows
......
This diff is collapsed.
......@@ -16,6 +16,8 @@ be found at the <A HREF="http://www.libsdl.org/"> main SDL page</A>.
Major changes since SDL 1.0.0:
</H2>
<UL>
<LI> 1.2.4: Added SDL_LockRect() and SDL_UnlockRect()
<LI> 1.2.4: Incorporated XFree86 extension libraries into the source
<LI> 1.2.4: Added initial support for Atari (thanks Patrice!)
<LI> 1.2.4: Added support for joysticks on *BSD (thanks Wilbern!)
<LI> 1.2.4: Added a YUV overlay test program (thanks Jon!)
......
......@@ -531,6 +531,26 @@ extern DECLSPEC void SDL_FreeSurface(SDL_Surface *surface);
extern DECLSPEC int SDL_LockSurface(SDL_Surface *surface);
extern DECLSPEC void SDL_UnlockSurface(SDL_Surface *surface);
/*
* SDL_LockRect() locks a portion of the surface designated by the 'rect'
* parameter, and saves the resulting pixels and pitch in the arguments.
* The rect will be clipped if it extends beyond the bounds of the surface
*
* This may be more efficient than a full lock if you are using a hardware
* surface and plan to make a few changes to small areas in the surface.
*
* While a rectangle is locked, no other lock or blit call may be called
* on the surface. No operating system or library calls should be made
* between lock/unlock pairs, as critical system locks may be held during
* this time.
*
* After the surface is unlocked, the pixels pointer is no longer valid.
*
* SDL_LockRect() returns 0, or -1 if the surface couldn't be locked.
*/
extern DECLSPEC int SDL_LockRect(SDL_Surface *surface, SDL_Rect *rect, void **pixels, int *pitch);
extern DECLSPEC void SDL_UnlockRect(SDL_Surface *surface);
/*
* Load a surface from a seekable SDL data source (memory or file.)
* If 'freesrc' is non-zero, the source will be closed after being read.
......
......@@ -74,6 +74,7 @@ _SDL_GetKeyState
_SDL_GetModState
_SDL_SetModState
_SDL_GetKeyName
_SDL_SetModuleHandle
_SDL_RegisterApp
_SDL_InitQuickDraw
_SDL_GetMouseState
......@@ -143,6 +144,8 @@ _SDL_CreateRGBSurfaceFrom
_SDL_FreeSurface
_SDL_LockSurface
_SDL_UnlockSurface
_SDL_LockRect
_SDL_UnlockRect
_SDL_LoadBMP_RW
_SDL_SaveBMP_RW
_SDL_SetColorKey
......@@ -174,3 +177,4 @@ _SDL_WM_SetIcon
_SDL_WM_IconifyWindow
_SDL_WM_ToggleFullScreen
_SDL_WM_GrabInput
_SDL_SoftStretch
......@@ -143,6 +143,8 @@
SDL_FreeSurface
SDL_LockSurface
SDL_UnlockSurface
SDL_LockRect
SDL_UnlockRect
SDL_LoadBMP_RW
SDL_SaveBMP_RW
SDL_SetColorKey
......@@ -174,4 +176,5 @@
SDL_WM_IconifyWindow
SDL_WM_ToggleFullScreen
SDL_WM_GrabInput
SDL_SoftStretch
SDL_InitQuickDraw
......@@ -141,6 +141,8 @@
_SDL_FreeSurface
_SDL_LockSurface
_SDL_UnlockSurface
_SDL_LockRect
_SDL_UnlockRect
_SDL_LoadBMP_RW
_SDL_SaveBMP_RW
_SDL_SetColorKey
......
......@@ -74,6 +74,7 @@
SDL_GetModState
SDL_SetModState
SDL_GetKeyName
SDL_SetModuleHandle
SDL_RegisterApp
SDL_InitQuickDraw
SDL_GetMouseState
......@@ -143,6 +144,8 @@
SDL_FreeSurface
SDL_LockSurface
SDL_UnlockSurface
SDL_LockRect
SDL_UnlockRect
SDL_LoadBMP_RW
SDL_SaveBMP_RW
SDL_SetColorKey
......
......@@ -9,7 +9,7 @@ DIST_SUBDIRS = dummy x11 dga nanox fbcon directfb vgl svga ggi aalib \
wincommon windib windx5 \
maccommon macdsp macrom quartz \
bwindow ps2gs photon cybergfx epoc \
ataricommon xbios gem
ataricommon xbios gem XFree86
DRIVERS = @VIDEO_DRIVERS@
......
......@@ -630,6 +630,10 @@ int SDL_FillRect(SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color)
*/
int SDL_LockSurface (SDL_Surface *surface)
{
if ( surface->locked < 0 ) {
SDL_SetError("Surface has a rectangle lock");
return(-1);
}
if ( ! surface->locked ) {
/* Perform the lock */
if ( surface->flags & (SDL_HWSURFACE|SDL_ASYNCBLIT) ) {
......@@ -653,6 +657,78 @@ int SDL_LockSurface (SDL_Surface *surface)
/* Ready to go.. */
return(0);
}
int SDL_LockRect (SDL_Surface *surface, SDL_Rect *rect, void **pixels, int *pitch)
{
int retval = 0;
/* Check to see if the surface is already locked */
*pixels = NULL;
if ( surface->locked != 0 ) {
SDL_SetError("Surface is already locked");
return(-1);
}
/* Clip the lock to the clipping rectangle of the surface */
{
SDL_Rect *clip = &surface->clip_rect;
int dx, dy;
int h = rect->h;
int w = rect->w;
dx = clip->x - rect->x;
if(dx > 0) {
w -= dx;
rect->x += dx;
}
dx = rect->x + w - clip->x - clip->w;
if(dx > 0)
w -= dx;
dy = clip->y - rect->y;
if(dy > 0) {
h -= dy;
rect->y += dy;
}
dy = rect->y + h - clip->y - clip->h;
if(dy > 0)
h -= dy;
if(w > 0 && h > 0) {
rect->w = w;
rect->h = h;
} else {
rect->w = 0;
rect->h = 0;
SDL_SetError("Rectangle was clipped");
return(-1);
}
}
/* Perform the lock */
if ( surface->flags & (SDL_HWSURFACE|SDL_ASYNCBLIT) ) {
SDL_VideoDevice *video = current_video;
SDL_VideoDevice *this = current_video;
if ( video->LockHWSurfaceRect ) {
retval = video->LockHWSurfaceRect(this, surface, rect, pixels, pitch);
if ( retval == 0 ) {
surface->locked = -1;
return 0;
}
}
}
if ( SDL_MUSTLOCK(surface) ) {
retval = SDL_LockSurface(surface);
if ( retval < 0 ) {
return retval;
}
}
surface->locked = -1;
*pixels = (Uint8 *)surface->pixels + rect->y * surface->pitch + rect->x * surface->format->BytesPerPixel;
*pitch = surface->pitch;
/* Ready to go.. */
return(0);
}
/*
* Unlock a previously locked surface
* -- Do not call this from any blit function, as SDL_DrawCursor() may recurse
......@@ -663,6 +739,9 @@ int SDL_LockSurface (SDL_Surface *surface)
void SDL_UnlockSurface (SDL_Surface *surface)
{
/* Only perform an unlock if we are locked */
if ( surface->locked < 0 ) {
return;
}
if ( ! surface->locked || (--surface->locked > 0) ) {
return;
}
......@@ -683,6 +762,29 @@ void SDL_UnlockSurface (SDL_Surface *surface)
}
}
}
void SDL_UnlockRect (SDL_Surface *surface)
{
/* Only perform an unlock if we are locked */
if ( surface->locked != -1 ) {
return;
}
/* Perform the unlock */
if ( surface->flags & (SDL_HWSURFACE|SDL_ASYNCBLIT) ) {
SDL_VideoDevice *video = current_video;
SDL_VideoDevice *this = current_video;
if ( video->LockHWSurfaceRect ) {
video->UnlockHWSurfaceRect(this, surface);
return;
}
}
if ( SDL_MUSTLOCK(surface) ) {
surface->locked = 1;
SDL_UnlockSurface(surface);
} else {
surface->locked = 0;
}
}
/*
* Convert a surface into the specified pixel format.
......
......@@ -153,6 +153,8 @@ struct SDL_VideoDevice {
/* Returns a readable/writable surface */
int (*LockHWSurface)(_THIS, SDL_Surface *surface);
void (*UnlockHWSurface)(_THIS, SDL_Surface *surface);
int (*LockHWSurfaceRect)(_THIS, SDL_Surface *surface, SDL_Rect *rect, void **pixels, int *pitch);
void (*UnlockHWSurfaceRect)(_THIS, SDL_Surface *surface);
/* Performs hardware flipping */
int (*FlipHWSurface)(_THIS, SDL_Surface *surface);
......
......@@ -1255,7 +1255,7 @@ int SDL_DisplayYUV_SW(_THIS, SDL_Overlay *overlay, SDL_Rect *dstrect)
Cb = lum + 3;
break;
default:
SDL_SetError("Unsupported YUV format in blit (??)");
SDL_SetError("Unsupported YUV format in blit");
return(-1);
}
if ( SDL_MUSTLOCK(display) ) {
......
SUBDIRS = extensions Xinerama Xv Xxf86dga Xxf86vm
EXTRA_DIST = README
The reason these libraries are built outside of the standard XFree86
tree is so that they can be linked as shared object code directly into
SDL without causing any symbol collisions with code in the application.
You can't link static library code into shared libraries on non-x86
Linux platforms. Since these libraries haven't become standard yet,
we'll just include them directly.
## Makefile.am for the XFree86 Xinerama library
noinst_LTLIBRARIES = libXFree86_Xinerama.la
libXFree86_Xinerama_la_SOURCES = Xinerama.c
/* $Xorg: XPanoramiX.c,v 1.4 2000/08/17 19:45:51 cpqbld Exp $ */
/*****************************************************************
Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Digital Equipment Corporation
shall not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
/* $XFree86: xc/lib/Xinerama/Xinerama.c,v 1.2 2001/07/23 17:20:28 dawes Exp $ */
#define NEED_EVENTS
#define NEED_REPLIES
#include <X11/Xlibint.h>
#include <X11/Xutil.h>
#include <X11/extensions/Xext.h> /* in ../include */
#include "extutil.h" /* in ../include */
#include "panoramiXext.h"
#include "panoramiXproto.h" /* in ../include */
#include "Xinerama.h"
static XExtensionInfo _panoramiX_ext_info_data;
static XExtensionInfo *panoramiX_ext_info = &_panoramiX_ext_info_data;
static /* const */ char *panoramiX_extension_name = PANORAMIX_PROTOCOL_NAME;
#define PanoramiXCheckExtension(dpy,i,val) \
XextCheckExtension (dpy, i, panoramiX_extension_name, val)
#define PanoramiXSimpleCheckExtension(dpy,i) \
XextSimpleCheckExtension (dpy, i, panoramiX_extension_name)
static int close_display();
static /* const */ XExtensionHooks panoramiX_extension_hooks = {
NULL, /* create_gc */
NULL, /* copy_gc */
NULL, /* flush_gc */
NULL, /* free_gc */
NULL, /* create_font */
NULL, /* free_font */
close_display, /* close_display */
NULL, /* wire_to_event */
NULL, /* event_to_wire */
NULL, /* error */
NULL, /* error_string */
};
static XEXT_GENERATE_FIND_DISPLAY (find_display, panoramiX_ext_info,
panoramiX_extension_name,
&panoramiX_extension_hooks,
0, NULL)
static XEXT_GENERATE_CLOSE_DISPLAY (close_display, panoramiX_ext_info)
/****************************************************************************
* *
* PanoramiX public interfaces *
* *
****************************************************************************/
Bool SDL_NAME(XPanoramiXQueryExtension) (
Display *dpy,
int *event_basep,
int *error_basep
)
{
XExtDisplayInfo *info = find_display (dpy);
if (XextHasExtension(info)) {
*event_basep = info->codes->first_event;
*error_basep = info->codes->first_error;
return True;
} else {
return False;
}
}
Status SDL_NAME(XPanoramiXQueryVersion)(
Display *dpy,
int *major_versionp,
int *minor_versionp
)
{
XExtDisplayInfo *info = find_display (dpy);
xPanoramiXQueryVersionReply rep;
register xPanoramiXQueryVersionReq *req;
PanoramiXCheckExtension (dpy, info, 0);
LockDisplay (dpy);
GetReq (PanoramiXQueryVersion, req);
req->reqType = info->codes->major_opcode;
req->panoramiXReqType = X_PanoramiXQueryVersion;
req->clientMajor = PANORAMIX_MAJOR_VERSION;
req->clientMinor = PANORAMIX_MINOR_VERSION;
if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
UnlockDisplay (dpy);
SyncHandle ();
return 0;
}
*major_versionp = rep.majorVersion;
*minor_versionp = rep.minorVersion;
UnlockDisplay (dpy);
SyncHandle ();
return 1;
}
SDL_NAME(XPanoramiXInfo) *SDL_NAME(XPanoramiXAllocInfo)(void)
{
return (SDL_NAME(XPanoramiXInfo) *) Xmalloc (sizeof (SDL_NAME(XPanoramiXInfo)));
}
Status SDL_NAME(XPanoramiXGetState) (
Display *dpy,
Drawable drawable,
SDL_NAME(XPanoramiXInfo) *panoramiX_info
)
{
XExtDisplayInfo *info = find_display (dpy);
xPanoramiXGetStateReply rep;
register xPanoramiXGetStateReq *req;
PanoramiXCheckExtension (dpy, info, 0);
LockDisplay (dpy);
GetReq (PanoramiXGetState, req);
req->reqType = info->codes->major_opcode;
req->panoramiXReqType = X_PanoramiXGetState;
req->window = drawable;
if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
UnlockDisplay (dpy);
SyncHandle ();
return 0;
}
UnlockDisplay (dpy);
SyncHandle ();
panoramiX_info->window = rep.window;
panoramiX_info->State = rep.state;
return 1;
}
Status SDL_NAME(XPanoramiXGetScreenCount) (
Display *dpy,
Drawable drawable,
SDL_NAME(XPanoramiXInfo) *panoramiX_info
)
{
XExtDisplayInfo *info = find_display (dpy);
xPanoramiXGetScreenCountReply rep;
register xPanoramiXGetScreenCountReq *req;
PanoramiXCheckExtension (dpy, info, 0);
LockDisplay (dpy);
GetReq (PanoramiXGetScreenCount, req);
req->reqType = info->codes->major_opcode;
req->panoramiXReqType = X_PanoramiXGetScreenCount;
req->window = drawable;
if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
UnlockDisplay (dpy);
SyncHandle ();
return 0;
}
UnlockDisplay (dpy);
SyncHandle ();
panoramiX_info->window = rep.window;
panoramiX_info->ScreenCount = rep.ScreenCount;
return 1;
}
Status SDL_NAME(XPanoramiXGetScreenSize) (
Display *dpy,
Drawable drawable,
int screen_num,
SDL_NAME(XPanoramiXInfo) *panoramiX_info
)
{
XExtDisplayInfo *info = find_display (dpy);
xPanoramiXGetScreenSizeReply rep;
register xPanoramiXGetScreenSizeReq *req;
PanoramiXCheckExtension (dpy, info, 0);
LockDisplay (dpy);
GetReq (PanoramiXGetScreenSize, req);
req->reqType = info->codes->major_opcode;
req->panoramiXReqType = X_PanoramiXGetScreenSize;
req->window = drawable;
req->screen = screen_num; /* need to define */
if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
UnlockDisplay (dpy);
SyncHandle ();
return 0;
}
UnlockDisplay (dpy);
SyncHandle ();
panoramiX_info->window = rep.window;
panoramiX_info->screen = rep.screen;
panoramiX_info->width = rep.width;
panoramiX_info->height = rep.height;
return 1;
}
/*******************************************************************\
Alternate interface to make up for shortcomings in the original,
namely, the omission of the screen origin. The new interface is
in the "Xinerama" namespace instead of "PanoramiX".
\*******************************************************************/
Bool SDL_NAME(XineramaQueryExtension) (
Display *dpy,
int *event_base,
int *error_base
)
{
return SDL_NAME(XPanoramiXQueryExtension)(dpy, event_base, error_base);
}
Status SDL_NAME(XineramaQueryVersion)(
Display *dpy,
int *major,
int *minor
)
{
return SDL_NAME(XPanoramiXQueryVersion)(dpy, major, minor);
}
Bool SDL_NAME(XineramaIsActive)(Display *dpy)
{
xXineramaIsActiveReply rep;
xXineramaIsActiveReq *req;
XExtDisplayInfo *info = find_display (dpy);
if(!XextHasExtension(info))
return False; /* server doesn't even have the extension */
LockDisplay (dpy);
GetReq (XineramaIsActive, req);
req->reqType = info->codes->major_opcode;
req->panoramiXReqType = X_XineramaIsActive;
if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
UnlockDisplay (dpy);
SyncHandle ();
return False;
}
UnlockDisplay (dpy);
SyncHandle ();
return rep.state;
}
#include <stdio.h>
SDL_NAME(XineramaScreenInfo) *
SDL_NAME(XineramaQueryScreens)(
Display *dpy,
int *number
)
{
XExtDisplayInfo *info = find_display (dpy);
xXineramaQueryScreensReply rep;
xXineramaQueryScreensReq *req;
SDL_NAME(XineramaScreenInfo) *scrnInfo = NULL;
PanoramiXCheckExtension (dpy, info, 0);
LockDisplay (dpy);
GetReq (XineramaQueryScreens, req);
req->reqType = info->codes->major_opcode;
req->panoramiXReqType = X_XineramaQueryScreens;
if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) {
UnlockDisplay (dpy);
SyncHandle ();
return NULL;
}
if(rep.number) {
if((scrnInfo = Xmalloc(sizeof(SDL_NAME(XineramaScreenInfo)) * rep.number))) {
xXineramaScreenInfo scratch;
int i;
for(i = 0; i < rep.number; i++) {
_XRead(dpy, (char*)(&scratch), sz_XineramaScreenInfo);
scrnInfo[i].screen_number = i;
scrnInfo[i].x_org = scratch.x_org;
scrnInfo[i].y_org = scratch.y_org;
scrnInfo[i].width = scratch.width;
scrnInfo[i].height = scratch.height;
}
*number = rep.number;
} else
_XEatData(dpy, rep.length << 2);
}
UnlockDisplay (dpy);
SyncHandle ();
return scrnInfo;
}
## Makefile.am for the XFree86 Xv library
noinst_LTLIBRARIES = libXFree86_Xv.la
libXFree86_Xv_la_SOURCES = Xv.c Xvlibint.h
This diff is collapsed.
/***********************************************************
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Digital or MIT not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/* $XFree86: xc/lib/Xv/Xvlibint.h,v 1.5 2001/07/25 15:04:53 dawes Exp $ */
#ifndef XVLIBINT_H
#define XVLIBINT_H
/*
** File:
**
** Xvlibint.h --- Xv library internal header file
**
** Author:
**
** David Carver (Digital Workstation Engineering/Project Athena)
**
** Revisions:
**
** 01.24.91 Carver
** - version 1.4 upgrade
**
*/
#define NEED_REPLIES
#include <X11/Xlibint.h>
#include "Xvproto.h"
#include "Xvlib.h"
#if !defined(UNIXCPP)
#define XvGetReq(name, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(xv##name##Req)) > dpy->bufmax)\
_XFlush(dpy);\
req = (xv##name##Req *)(dpy->last_req = dpy->bufptr);\
req->reqType = info->codes->major_opcode;\
req->xvReqType = xv_##name; \
req->length = (SIZEOF(xv##name##Req))>>2;\
dpy->bufptr += SIZEOF(xv##name##Req);\
dpy->request++
#else /* non-ANSI C uses empty comment instead of "##" for token concatenation */
#define XvGetReq(name, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(xv/**/name/**/Req)) > dpy->bufmax)\
_XFlush(dpy);\
req = (xv/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
req->reqType = info->codes->major_opcode;\
req->xvReqType = xv_/**/name;\
req->length = (SIZEOF(xv/**/name/**/Req))>>2;\
dpy->bufptr += SIZEOF(xv/**/name/**/Req);\
dpy->request++
#endif
#endif /* XVLIBINT_H */
## Makefile.am for the XFree86 Xxf86dga library
noinst_LTLIBRARIES = libXFree86_Xxf86dga.la
libXFree86_Xxf86dga_la_SOURCES = XF86DGA2.c XF86DGA.c
This diff is collapsed.
This diff is collapsed.
## Makefile.am for the XFree86 Xxf86vm library
noinst_LTLIBRARIES = libXFree86_Xxf86vm.la
libXFree86_Xxf86vm_la_SOURCES = XF86VMode.c
This diff is collapsed.
noinst_HEADERS = \
extutil.h \
panoramiXext.h \
panoramiXproto.h \
SDLname.h \
xf86dga1.h \
xf86dga1str.h \
xf86dga.h \
xf86dgastr.h \
xf86vmode.h \
xf86vmstr.h \
Xinerama.h \
Xv.h \
Xvlib.h \
Xvproto.h
#ifndef _SDLname_h_
#define _SDLname_h_
#define NeedFunctionPrototypes 1
#define SDL_NAME(X) SDL_##X
#endif
/* $XFree86: xc/include/extensions/Xinerama.h,v 3.2 2000/03/01 01:04:20 dawes Exp $ */
#ifndef _Xinerama_h
#define _Xinerama_h
#include "SDLname.h"
typedef struct {
int screen_number;
short x_org;
short y_org;
short width;
short height;
} SDL_NAME(XineramaScreenInfo);
Bool SDL_NAME(XineramaQueryExtension) (
Display *dpy,
int *event_base,
int *error_base
);
Status SDL_NAME(XineramaQueryVersion)(
Display *dpy,
int *major,
int *minor
);
Bool SDL_NAME(XineramaIsActive)(Display *dpy);
/*
Returns the number of heads and a pointer to an array of
structures describing the position and size of the individual
heads. Returns NULL and number = 0 if Xinerama is not active.
Returned array should be freed with XFree().
*/
SDL_NAME(XineramaScreenInfo) *
SDL_NAME(XineramaQueryScreens)(
Display *dpy,
int *number
);
#endif /* _Xinerama_h */
/***********************************************************
Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Digital or MIT not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/* $XFree86: xc/include/extensions/Xv.h,v 1.5 1999/12/11 19:28:48 mvojkovi Exp $ */
#ifndef XV_H
#define XV_H
/*
** File:
**
** Xv.h --- Xv shared library and server header file
**
** Author:
**
** David Carver (Digital Workstation Engineering/Project Athena)
**
** Revisions:
**
** 05.15.91 Carver
** - version 2.0 upgrade
**
** 01.24.91 Carver
** - version 1.4 upgrade
**
*/
#include <X11/X.h>
#define XvName "XVideo"
#define XvVersion 2
#define XvRevision 2
/* Symbols */
typedef XID XvPortID;
typedef XID XvEncodingID;
#define XvNone 0
#define XvInput 0
#define XvOutput 1
#define XvInputMask (1L<<XvInput)
#define XvOutputMask (1L<<XvOutput)
#define XvVideoMask 0x00000004
#define XvStillMask 0x00000008
#define XvImageMask 0x00000010
/* These two are not client viewable */
#define XvPixmapMask 0x00010000
#define XvWindowMask 0x00020000
#define XvGettable 0x01
#define XvSettable 0x02
#define XvRGB 0
#define XvYUV 1
#define XvPacked 0
#define XvPlanar 1
#define XvTopToBottom 0
#define XvBottomToTop 1
/* Events */
#define XvVideoNotify 0
#define XvPortNotify 1
#define XvNumEvents 2
/* Video Notify Reasons */
#define XvStarted 0
#define XvStopped 1
#define XvBusy 2
#define XvPreempted 3
#define XvHardError 4
#define XvLastReason 4
#define XvNumReasons (XvLastReason + 1)
#define XvStartedMask (1L<<XvStarted)
#define XvStoppedMask (1L<<XvStopped)
#define XvBusyMask (1L<<XvBusy)
#define XvPreemptedMask (1L<<XvPreempted)
#define XvHardErrorMask (1L<<XvHardError)
#define XvAnyReasonMask ((1L<<XvNumReasons) - 1)
#define XvNoReasonMask 0
/* Errors */
#define XvBadPort 0
#define XvBadEncoding 1
#define XvBadControl 2
#define XvNumErrors 3
/* Status */
#define XvBadExtension 1
#define XvAlreadyGrabbed 2
#define XvInvalidTime 3
#define XvBadReply 4
#define XvBadAlloc 5
#endif /* XV_H */
This diff is collapsed.
This diff is collapsed.
/*
* $Xorg: extutil.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $
*
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*
* Author: Jim Fulton, MIT The Open Group
*
* Xlib Extension-Writing Utilities
*
* This package contains utilities for writing the client API for various
* protocol extensions. THESE INTERFACES ARE NOT PART OF THE X STANDARD AND
* ARE SUBJECT TO CHANGE!
*/
/* $XFree86: xc/include/extensions/extutil.h,v 1.9 2001/12/14 19:53:28 dawes Exp $ */
#ifndef _EXTUTIL_H_
#define _EXTUTIL_H_
#include <X11/extensions/Xext.h>
/*
* We need to keep a list of open displays since the Xlib display list isn't
* public. We also have to per-display info in a separate block since it isn't
* stored directly in the Display structure.
*/
typedef struct _XExtDisplayInfo {
struct _XExtDisplayInfo *next; /* keep a linked list */
Display *display; /* which display this is */
XExtCodes *codes; /* the extension protocol codes */
XPointer data; /* extra data for extension to use */
} XExtDisplayInfo;
typedef struct _XExtensionInfo {
XExtDisplayInfo *head; /* start of list */
XExtDisplayInfo *cur; /* most recently used */
int ndisplays; /* number of displays */
} XExtensionInfo;
typedef struct _XExtensionHooks {
int (*create_gc)(
#if NeedNestedPrototypes
Display* /* display */,
GC /* gc */,
XExtCodes* /* codes */
#endif
);
int (*copy_gc)(
#if NeedNestedPrototypes
Display* /* display */,
GC /* gc */,
XExtCodes* /* codes */
#endif
);
int (*flush_gc)(
#if NeedNestedPrototypes
Display* /* display */,
GC /* gc */,
XExtCodes* /* codes */
#endif
);
int (*free_gc)(
#if NeedNestedPrototypes
Display* /* display */,
GC /* gc */,
XExtCodes* /* codes */
#endif
);
int (*create_font)(
#if NeedNestedPrototypes
Display* /* display */,
XFontStruct* /* fs */,
XExtCodes* /* codes */
#endif
);
int (*free_font)(
#if NeedNestedPrototypes
Display* /* display */,
XFontStruct* /* fs */,
XExtCodes* /* codes */
#endif
);
int (*close_display)(
#if NeedNestedPrototypes
Display* /* display */,
XExtCodes* /* codes */
#endif
);
Bool (*wire_to_event)(
#if NeedNestedPrototypes
Display* /* display */,
XEvent* /* re */,
xEvent* /* event */
#endif
);
Status (*event_to_wire)(
#if NeedNestedPrototypes
Display* /* display */,
XEvent* /* re */,
xEvent* /* event */
#endif
);
int (*error)(
#if NeedNestedPrototypes
Display* /* display */,
xError* /* err */,
XExtCodes* /* codes */,
int* /* ret_code */
#endif
);
char *(*error_string)(
#if NeedNestedPrototypes
Display* /* display */,
int /* code */,
XExtCodes* /* codes */,
char* /* buffer */,
int /* nbytes */
#endif
);
} XExtensionHooks;
extern XExtensionInfo *XextCreateExtension(
#if NeedFunctionPrototypes
void
#endif
);
extern void XextDestroyExtension(
#if NeedFunctionPrototypes
XExtensionInfo* /* info */
#endif
);
extern XExtDisplayInfo *XextAddDisplay(
#if NeedFunctionPrototypes
XExtensionInfo* /* extinfo */,
Display* /* dpy */,
char* /* ext_name */,
XExtensionHooks* /* hooks */,
int /* nevents */,
XPointer /* data */
#endif
);
extern int XextRemoveDisplay(
#if NeedFunctionPrototypes
XExtensionInfo* /* extinfo */,
Display* /* dpy */
#endif
);
extern XExtDisplayInfo *XextFindDisplay(
#if NeedFunctionPrototypes
XExtensionInfo* /* extinfo */,
Display* /* dpy */
#endif
);
#define XextHasExtension(i) ((i) && ((i)->codes))
#define XextCheckExtension(dpy,i,name,val) \
if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return val; }
#define XextSimpleCheckExtension(dpy,i,name) \
if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return; }
/*
* helper macros to generate code that is common to all extensions; caller
* should prefix it with static if extension source is in one file; this
* could be a utility function, but have to stack 6 unused arguments for
* something that is called many, many times would be bad.
*/
#define XEXT_GENERATE_FIND_DISPLAY(proc,extinfo,extname,hooks,nev,data) \
XExtDisplayInfo *proc (Display *dpy) \
{ \
XExtDisplayInfo *dpyinfo; \
if (!extinfo) { if (!(extinfo = XextCreateExtension())) return NULL; } \
if (!(dpyinfo = XextFindDisplay (extinfo, dpy))) \
dpyinfo = XextAddDisplay (extinfo,dpy,extname,hooks,nev,data); \
return dpyinfo; \
}
#define XEXT_FIND_DISPLAY_PROTO(proc) \
XExtDisplayInfo *proc(Display *dpy)
#define XEXT_GENERATE_CLOSE_DISPLAY(proc,extinfo) \
int proc (Display *dpy, XExtCodes *codes) \
{ \
return XextRemoveDisplay (extinfo, dpy); \
}
#define XEXT_CLOSE_DISPLAY_PROTO(proc) \
int proc(Display *dpy, XExtCodes *codes)
#define XEXT_GENERATE_ERROR_STRING(proc,extname,nerr,errl) \
char *proc (Display *dpy, int code, XExtCodes *codes, char *buf, int n) \
{ \
code -= codes->first_error; \
if (code >= 0 && code < nerr) { \
char tmp[256]; \
sprintf (tmp, "%s.%d", extname, code); \
XGetErrorDatabaseText (dpy, "XProtoError", tmp, errl[code], buf, n); \
return buf; \
} \
return (char *)0; \
}
#define XEXT_ERROR_STRING_PROTO(proc) \
char *proc(Display *dpy, int code, XExtCodes *codes, char *buf, int n)
#endif
/* $Xorg: panoramiXext.h,v 1.4 2000/08/18 04:05:45 coskrey Exp $ */
/*****************************************************************
Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Digital Equipment Corporation
shall not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
/*
* PanoramiX definitions
*/
/* $XFree86: xc/include/extensions/panoramiXext.h,v 3.6 2001/01/17 17:53:22 dawes Exp $ */
#include "SDLname.h"
/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */
#define PANORAMIX_MAJOR_VERSION 1 /* current version number */
#define PANORAMIX_MINOR_VERSION 1
typedef struct {
Window window; /* PanoramiX window - may not exist */
int screen;
int State; /* PanroamiXOff, PanoramiXOn */
int width; /* width of this screen */
int height; /* height of this screen */
int ScreenCount; /* real physical number of screens */
XID eventMask; /* selected events for this client */
} SDL_NAME(XPanoramiXInfo);
extern SDL_NAME(XPanoramiXInfo) *SDL_NAME(XPanoramiXAllocInfo) (
#if NeedFunctionPrototypes
void
#endif
);
/* $Xorg: panoramiXproto.h,v 1.4 2000/08/18 04:05:45 coskrey Exp $ */
/*****************************************************************
Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Digital Equipment Corporation
shall not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
/* $XFree86: xc/include/extensions/panoramiXproto.h,v 3.6 2001/01/17 17:53:22 dawes Exp $ */
/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */
#ifndef _PANORAMIXPROTO_H_
#define _PANORAMIXPROTO_H_
#define PANORAMIX_PROTOCOL_NAME "XINERAMA"
#define X_PanoramiXQueryVersion 0
#define X_PanoramiXGetState 1
#define X_PanoramiXGetScreenCount 2
#define X_PanoramiXGetScreenSize 3
#define X_XineramaIsActive 4
#define X_XineramaQueryScreens 5
typedef struct _PanoramiXQueryVersion {
CARD8 reqType; /* always PanoramiXReqCode */
CARD8 panoramiXReqType; /* always X_PanoramiXQueryVersion */
CARD16 length B16;
CARD8 clientMajor;
CARD8 clientMinor;
CARD16 unused B16;
} xPanoramiXQueryVersionReq;
#define sz_xPanoramiXQueryVersionReq 8
typedef struct {
CARD8 type; /* must be X_Reply */
CARD8 pad1; /* unused */
CARD16 sequenceNumber B16; /* last sequence number */
CARD32 length B32; /* 0 */
CARD16 majorVersion B16;
CARD16 minorVersion B16;
CARD32 pad2 B32; /* unused */
CARD32 pad3 B32; /* unused */
CARD32 pad4 B32; /* unused */
CARD32 pad5 B32; /* unused */
CARD32 pad6 B32; /* unused */
} xPanoramiXQueryVersionReply;
#define sz_xPanoramiXQueryVersionReply 32
typedef struct _PanoramiXGetState {
CARD8 reqType; /* always PanoramiXReqCode */
CARD8 panoramiXReqType; /* always X_PanoramiXGetState */
CARD16 length B16;
CARD32 window B32;
} xPanoramiXGetStateReq;
#define sz_xPanoramiXGetStateReq 8
typedef struct {
BYTE type;
BYTE state;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 window B32;
CARD32 pad1 B32; /* unused */
CARD32 pad2 B32; /* unused */
CARD32 pad3 B32; /* unused */
CARD32 pad4 B32; /* unused */
CARD32 pad5 B32; /* unused */
} xPanoramiXGetStateReply;
#define sz_panoramiXGetStateReply 32
typedef struct _PanoramiXGetScreenCount {
CARD8 reqType; /* always PanoramiXReqCode */
CARD8 panoramiXReqType; /* always X_PanoramiXGetScreenCount */
CARD16 length B16;
CARD32 window B32;
} xPanoramiXGetScreenCountReq;
#define sz_xPanoramiXGetScreenCountReq 8
typedef struct {
BYTE type;
BYTE ScreenCount;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 window B32;
CARD32 pad1 B32; /* unused */
CARD32 pad2 B32; /* unused */
CARD32 pad3 B32; /* unused */
CARD32 pad4 B32; /* unused */
CARD32 pad5 B32; /* unused */
} xPanoramiXGetScreenCountReply;
#define sz_panoramiXGetScreenCountReply 32
typedef struct _PanoramiXGetScreenSize {
CARD8 reqType; /* always PanoramiXReqCode */
CARD8 panoramiXReqType; /* always X_PanoramiXGetState */
CARD16 length B16;
CARD32 window B32;
CARD32 screen B32;
} xPanoramiXGetScreenSizeReq;
#define sz_xPanoramiXGetScreenSizeReq 12
typedef struct {
BYTE type;
CARD8 pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 width B32;
CARD32 height B32;
CARD32 window B32;
CARD32 screen B32;
CARD32 pad2 B32; /* unused */
CARD32 pad3 B32; /* unused */
} xPanoramiXGetScreenSizeReply;
#define sz_panoramiXGetScreenSizeReply 32
/************ Alternate protocol ******************/
typedef struct {
CARD8 reqType;
CARD8 panoramiXReqType;
CARD16 length B16;
} xXineramaIsActiveReq;
#define sz_xXineramaIsActiveReq 4
typedef struct {
BYTE type;
CARD8 pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 state B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXineramaIsActiveReply;
#define sz_XineramaIsActiveReply 32
typedef struct {
CARD8 reqType;
CARD8 panoramiXReqType;
CARD16 length B16;
} xXineramaQueryScreensReq;
#define sz_xXineramaQueryScreensReq 4
typedef struct {
BYTE type;
CARD8 pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 number B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXineramaQueryScreensReply;
#define sz_XineramaQueryScreensReply 32
typedef struct {
INT16 x_org B16;
INT16 y_org B16;
CARD16 width B16;
CARD16 height B16;
} xXineramaScreenInfo;
#define sz_XineramaScreenInfo 8
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -29,7 +29,7 @@ static char rcsid =
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/extensions/xf86dga.h>
#include <XFree86/extensions/xf86dga.h>
#include "SDL_sysvideo.h"
#include "SDL_events_c.h"
......@@ -45,7 +45,7 @@ extern SDL_keysym *X11_TranslateKey(Display *display, XKeyEvent *xkey,
static int DGA_DispatchEvent(_THIS)
{
int posted;
XDGAEvent xevent;
SDL_NAME(XDGAEvent) xevent;
XNextEvent(DGA_Display, (XEvent *)&xevent);
......@@ -82,7 +82,7 @@ static int DGA_DispatchEvent(_THIS)
SDL_keysym keysym;
XKeyEvent xkey;
XDGAKeyEventToXKeyEvent(&xevent.xkey, &xkey);
SDL_NAME(XDGAKeyEventToXKeyEvent)(&xevent.xkey, &xkey);
posted = SDL_PrivateKeyboard((xevent.type == KeyPress),
X11_TranslateKey(DGA_Display,
&xkey, xkey.keycode,
......
This diff is collapsed.
This diff is collapsed.
......@@ -61,9 +61,9 @@ void X11_EnableDGAMouse(_THIS)
}
/* Only use DGA mouse if the cursor is not showing (in relative mode) */
if ( use_dgamouse && local_X11 && !(using_dga & DGA_MOUSE) &&
XF86DGAQueryExtension(SDL_Display, &dga_event, &dga_error) &&
XF86DGAQueryVersion(SDL_Display, &dga_major, &dga_minor) ) {
if ( XF86DGADirectVideo(SDL_Display, SDL_Screen, XF86DGADirectMouse) ) {
SDL_NAME(XF86DGAQueryExtension)(SDL_Display, &dga_event, &dga_error) &&
SDL_NAME(XF86DGAQueryVersion)(SDL_Display, &dga_major, &dga_minor) ) {
if ( SDL_NAME(XF86DGADirectVideo)(SDL_Display, SDL_Screen, XF86DGADirectMouse) ) {
using_dga |= DGA_MOUSE;
}
}
......@@ -77,9 +77,9 @@ void X11_CheckDGAMouse(_THIS)
int flags;
if ( using_dga & DGA_MOUSE ) {
XF86DGAQueryDirectVideo(SDL_Display, SDL_Screen, &flags);
SDL_NAME(XF86DGAQueryDirectVideo)(SDL_Display, SDL_Screen, &flags);
if ( ! (flags & XF86DGADirectMouse) ) {
XF86DGADirectVideo(SDL_Display,SDL_Screen,XF86DGADirectMouse);
SDL_NAME(XF86DGADirectVideo)(SDL_Display,SDL_Screen,XF86DGADirectMouse);
}
}
#endif
......@@ -89,7 +89,7 @@ void X11_DisableDGAMouse(_THIS)
{
#ifdef XFREE86_DGAMOUSE
if ( using_dga & DGA_MOUSE ) {
XF86DGADirectVideo(SDL_Display, SDL_Screen, 0);
SDL_NAME(XF86DGADirectVideo)(SDL_Display, SDL_Screen, 0);
using_dga &= ~DGA_MOUSE;
}
#endif /* XFREE86_DGAMOUSE */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment