Removed the API changes to preserve SDL 1.2 stability
authorSam Lantinga <slouken@libsdl.org>
Wed, 06 Mar 2002 11:05:47 +0000
changeset 296fab1ddc4d7bf
parent 295 54ad1d2f1325
child 297 f6ffac90895c
Removed the API changes to preserve SDL 1.2 stability
WhatsNew
configure.in
docs.html
include/Makefile.am
include/SDL.h
include/SDL_loadso.h
include/SDL_video.h
sdl-config.in
src/Makefile.am
src/SDL_loadso.c
src/SDL_loadso.h
src/main/beos/exports/Makefile
src/main/beos/exports/SDL.exp
src/main/macos/exports/Makefile
src/main/macos/exports/SDL.x
src/main/macosx/exports/Makefile
src/main/macosx/exports/SDL.x
src/main/win32/exports/Makefile
src/main/win32/exports/SDL.def
src/video/SDL_surface.c
src/video/SDL_sysvideo.h
src/video/windx5/SDL_dx5video.c
     1.1 --- a/WhatsNew	Wed Mar 06 05:37:21 2002 +0000
     1.2 +++ b/WhatsNew	Wed Mar 06 11:05:47 2002 +0000
     1.3 @@ -3,18 +3,6 @@
     1.4  
     1.5  Version 1.0:
     1.6  
     1.7 -1.2.4:
     1.8 -	Added a new header file: SDL_loadso.h
     1.9 -	It contains the following functions:
    1.10 -		SDL_LoadObject(), SDL_LoadFunction(), SDL_UnloadObject()
    1.11 -	The UNIX esd and arts audio code use these to dynamically load
    1.12 -	their respective audio libraries.
    1.13 -
    1.14 -	Added SDL_LockRect() and SDL_UnlockRect() to lock a portion of a
    1.15 -	surface.  This may be more efficient than a full lock if you are
    1.16 -	using a hardware surface and plan to make a few changes to small
    1.17 -	areas in the surface.
    1.18 -
    1.19  1.2.0:
    1.20  	Added SDL_VIDEOEXPOSE event to signal that the screen needs to
    1.21  	be redrawn.  This is currently only delivered to OpenGL windows
     2.1 --- a/configure.in	Wed Mar 06 05:37:21 2002 +0000
     2.2 +++ b/configure.in	Wed Mar 06 11:05:47 2002 +0000
     2.3 @@ -15,7 +15,7 @@
     2.4  SDL_MAJOR_VERSION=1
     2.5  SDL_MINOR_VERSION=2
     2.6  SDL_MICRO_VERSION=4
     2.7 -SDL_INTERFACE_AGE=0
     2.8 +SDL_INTERFACE_AGE=4
     2.9  SDL_BINARY_AGE=4
    2.10  SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
    2.11  
    2.12 @@ -328,11 +328,15 @@
    2.13          AM_PATH_ESD(0.2.8, use_esd=yes)
    2.14  	if test x$use_esd = xyes; then
    2.15              AC_ARG_ENABLE(esd-shared,
    2.16 -[  --enable-esd-shared     dynamically load ESD support [default=yes]],
    2.17 -                          , enable_esd_shared=yes)
    2.18 +[  --enable-esd-shared     dynamically load ESD audio support [default=no]],
    2.19 +                          , enable_esd_shared=no)
    2.20              esd_lib_spec=`echo $ESD_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libesd.so.*/'`
    2.21  	    esd_lib=`ls $esd_lib_spec | head -1 | sed 's/.*\/\(.*\)/\1/'`
    2.22  	    echo "-- $esd_lib_spec -> $esd_lib"
    2.23 +            if test x$enable_dlopen != xyes && \
    2.24 +               test x$enable_esd_shared = xyes; then
    2.25 +                AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option])
    2.26 +            fi
    2.27              if test x$enable_dlopen = xyes && \
    2.28                 test x$enable_esd_shared = xyes && test x$esd_lib != x; then
    2.29                  CFLAGS="$CFLAGS -DESD_SUPPORT -DESD_DYNAMIC=\$(esd_lib) $ESD_CFLAGS"
    2.30 @@ -374,11 +378,15 @@
    2.31              AC_MSG_RESULT($audio_arts)
    2.32              if test x$audio_arts = xyes; then
    2.33                  AC_ARG_ENABLE(arts-shared,
    2.34 -[  --enable-arts-shared     dynamically load ESD support [default=yes]],
    2.35 -                              , enable_arts_shared=yes)
    2.36 +[  --enable-arts-shared     dynamically load aRts audio support [default=no]],
    2.37 +                              , enable_arts_shared=no)
    2.38                  arts_lib_spec=`echo $ARTSC_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libarts.so.*/'`
    2.39  	        arts_lib=`ls $arts_lib_spec | head -1 | sed 's/.*\/\(.*\)/\1/'`
    2.40  	        echo "-- $arts_lib_spec -> $arts_lib"
    2.41 +                if test x$enable_dlopen != xyes && \
    2.42 +                   test x$enable_arts_shared = xyes; then
    2.43 +                    AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option])
    2.44 +                fi
    2.45                  if test x$enable_dlopen = xyes && \
    2.46                     test x$enable_arts_shared = xyes && test x$arts_lib != x; then
    2.47                      CFLAGS="$CFLAGS -DARTSC_SUPPORT -DARTSC_DYNAMIC=\$(arts_lib) $ARTSC_CFLAGS"
    2.48 @@ -998,7 +1006,9 @@
    2.49          AC_MSG_RESULT($video_opengl)
    2.50          if test x$video_opengl = xyes; then
    2.51              CFLAGS="$CFLAGS -DHAVE_OPENGL"
    2.52 -            AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl")
    2.53 +            if test x$use_dlopen != xyes; then
    2.54 +                AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl")
    2.55 +            fi
    2.56          fi
    2.57      fi
    2.58  }
    2.59 @@ -1383,8 +1393,8 @@
    2.60  CheckDLOPEN()
    2.61  {
    2.62      AC_ARG_ENABLE(dlopen,
    2.63 -[  --enable-dlopen         use dlopen for shared object loading [default=yes]],
    2.64 -                  , enable_dlopen=yes)
    2.65 +[  --enable-dlopen         use dlopen for shared object loading [default=no]],
    2.66 +                  , enable_dlopen=no)
    2.67      if test x$enable_dlopen = xyes; then
    2.68          AC_MSG_CHECKING(for dlopen)
    2.69          use_dlopen=no
    2.70 @@ -1398,7 +1408,7 @@
    2.71  
    2.72          if test x$use_dlopen = xyes; then
    2.73              CFLAGS="$CFLAGS -DUSE_DLOPEN"
    2.74 -            SYSTEM_LIBS="$SYSTEM_LIBS -ldl"
    2.75 +            AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl")
    2.76          fi
    2.77      fi
    2.78  }
     3.1 --- a/docs.html	Wed Mar 06 05:37:21 2002 +0000
     3.2 +++ b/docs.html	Wed Mar 06 11:05:47 2002 +0000
     3.3 @@ -16,8 +16,6 @@
     3.4  Major changes since SDL 1.0.0:
     3.5  </H2>
     3.6  <UL>
     3.7 -	<LI> 1.2.4: Added shared object loading functions in SDL_loadso.h
     3.8 -	<LI> 1.2.4: Added SDL_LockRect() and SDL_UnlockRect()
     3.9  	<LI> 1.2.4: Incorporated XFree86 extension libraries into the source
    3.10  	<LI> 1.2.4: Added initial support for Atari (thanks Patrice!)
    3.11  	<LI> 1.2.4: Added support for joysticks on *BSD (thanks Wilbern!)
     4.1 --- a/include/Makefile.am	Wed Mar 06 05:37:21 2002 +0000
     4.2 +++ b/include/Makefile.am	Wed Mar 06 11:05:47 2002 +0000
     4.3 @@ -18,7 +18,6 @@
     4.4  	SDL_joystick.h		\
     4.5  	SDL_keyboard.h		\
     4.6  	SDL_keysym.h		\
     4.7 -	SDL_loadso.h		\
     4.8  	SDL_main.h		\
     4.9  	SDL_mouse.h		\
    4.10  	SDL_mutex.h		\
     5.1 --- a/include/SDL.h	Wed Mar 06 05:37:21 2002 +0000
     5.2 +++ b/include/SDL.h	Wed Mar 06 11:05:47 2002 +0000
     5.3 @@ -34,7 +34,6 @@
     5.4  #include "SDL_types.h"
     5.5  #include "SDL_getenv.h"
     5.6  #include "SDL_error.h"
     5.7 -#include "SDL_loadso.h"
     5.8  #include "SDL_rwops.h"
     5.9  #include "SDL_timer.h"
    5.10  #include "SDL_audio.h"
     6.1 --- a/include/SDL_loadso.h	Wed Mar 06 05:37:21 2002 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,61 +0,0 @@
     6.4 -/*
     6.5 -    SDL - Simple DirectMedia Layer
     6.6 -    Copyright (C) 1997, 1998, 1999, 2000, 2001  Sam Lantinga
     6.7 -
     6.8 -    This library is free software; you can redistribute it and/or
     6.9 -    modify it under the terms of the GNU Library General Public
    6.10 -    License as published by the Free Software Foundation; either
    6.11 -    version 2 of the License, or (at your option) any later version.
    6.12 -
    6.13 -    This library is distributed in the hope that it will be useful,
    6.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    6.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    6.16 -    Library General Public License for more details.
    6.17 -
    6.18 -    You should have received a copy of the GNU Library General Public
    6.19 -    License along with this library; if not, write to the Free
    6.20 -    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    6.21 -
    6.22 -    Sam Lantinga
    6.23 -    slouken@libsdl.org
    6.24 -*/
    6.25 -
    6.26 -#ifdef SAVE_RCSID
    6.27 -static char rcsid =
    6.28 - "@(#) $Id$";
    6.29 -#endif
    6.30 -
    6.31 -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    6.32 -/* System dependent library loading routines                           */
    6.33 -
    6.34 -#ifndef _SDL_loadso_h
    6.35 -#define _SDL_loadso_h
    6.36 -
    6.37 -#include "begin_code.h"
    6.38 -/* Set up for C function definitions, even when using C++ */
    6.39 -#ifdef __cplusplus
    6.40 -extern "C" {
    6.41 -#endif
    6.42 -
    6.43 -/* This function dynamically loads a shared object and returns a pointer
    6.44 - * to the object handle (or NULL if there was an error).
    6.45 - * The 'sofile' parameter is a system dependent name of the object file.
    6.46 - */
    6.47 -extern DECLSPEC void *SDL_LoadObject(const char *sofile);
    6.48 -
    6.49 -/* Given an object handle, this function looks up the address of the
    6.50 - * named function in the shared object and returns it.  This address
    6.51 - * is no longer valid after calling SDL_UnloadObject().
    6.52 - */
    6.53 -extern DECLSPEC void *SDL_LoadFunction(void *handle, const char *name);
    6.54 -
    6.55 -/* Unload a shared object from memory */
    6.56 -extern DECLSPEC void SDL_UnloadObject(void *handle);
    6.57 -
    6.58 -/* Ends C function definitions when using C++ */
    6.59 -#ifdef __cplusplus
    6.60 -}
    6.61 -#endif
    6.62 -#include "close_code.h"
    6.63 -
    6.64 -#endif /* _SDL_loadso_h */
     7.1 --- a/include/SDL_video.h	Wed Mar 06 05:37:21 2002 +0000
     7.2 +++ b/include/SDL_video.h	Wed Mar 06 11:05:47 2002 +0000
     7.3 @@ -532,26 +532,6 @@
     7.4  extern DECLSPEC void SDL_UnlockSurface(SDL_Surface *surface);
     7.5  
     7.6  /*
     7.7 - * SDL_LockRect() locks a portion of the surface designated by the 'rect'
     7.8 - * parameter, and saves the resulting pixels and pitch in the arguments.
     7.9 - * The rect will be clipped if it extends beyond the bounds of the surface
    7.10 - *
    7.11 - * This may be more efficient than a full lock if you are using a hardware
    7.12 - * surface and plan to make a few changes to small areas in the surface.
    7.13 - *
    7.14 - * While a rectangle is locked, no other lock or blit call may be called
    7.15 - * on the surface.  No operating system or library calls should be made
    7.16 - * between lock/unlock pairs, as critical system locks may be held during
    7.17 - * this time.
    7.18 - *
    7.19 - * After the surface is unlocked, the pixels pointer is no longer valid.
    7.20 - *
    7.21 - * SDL_LockRect() returns 0, or -1 if the surface couldn't be locked.
    7.22 - */
    7.23 -extern DECLSPEC int SDL_LockRect(SDL_Surface *surface, SDL_Rect *rect, void **pixels, int *pitch);
    7.24 -extern DECLSPEC void SDL_UnlockRect(SDL_Surface *surface);
    7.25 -
    7.26 -/*
    7.27   * Load a surface from a seekable SDL data source (memory or file.)
    7.28   * If 'freesrc' is non-zero, the source will be closed after being read.
    7.29   * Returns the new surface, or NULL if there was an error.
     8.1 --- a/sdl-config.in	Wed Mar 06 05:37:21 2002 +0000
     8.2 +++ b/sdl-config.in	Wed Mar 06 11:05:47 2002 +0000
     8.3 @@ -5,7 +5,7 @@
     8.4  exec_prefix_set=no
     8.5  
     8.6  usage="\
     8.7 -Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
     8.8 +Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"
     8.9  
    8.10  if test $# -eq 0; then
    8.11        echo "${usage}" 1>&2
     9.1 --- a/src/Makefile.am	Wed Mar 06 05:37:21 2002 +0000
     9.2 +++ b/src/Makefile.am	Wed Mar 06 11:05:47 2002 +0000
     9.3 @@ -38,5 +38,6 @@
     9.4  	SDL_fatal.c		\
     9.5  	SDL_fatal.h		\
     9.6  	SDL_getenv.c		\
     9.7 -	SDL_loadso.c
     9.8 +	SDL_loadso.c		\
     9.9 +	SDL_loadso.h
    9.10  
    10.1 --- a/src/SDL_loadso.c	Wed Mar 06 05:37:21 2002 +0000
    10.2 +++ b/src/SDL_loadso.c	Wed Mar 06 11:05:47 2002 +0000
    10.3 @@ -44,6 +44,7 @@
    10.4  /*#error Unsupported dynamic link environment*/
    10.5  #endif /* system type */
    10.6  
    10.7 +#include "SDL_types.h"
    10.8  #include "SDL_error.h"
    10.9  #include "SDL_loadso.h"
   10.10  
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/src/SDL_loadso.h	Wed Mar 06 11:05:47 2002 +0000
    11.3 @@ -0,0 +1,62 @@
    11.4 +/*
    11.5 +    SDL - Simple DirectMedia Layer
    11.6 +    Copyright (C) 1997, 1998, 1999, 2000, 2001  Sam Lantinga
    11.7 +
    11.8 +    This library is free software; you can redistribute it and/or
    11.9 +    modify it under the terms of the GNU Library General Public
   11.10 +    License as published by the Free Software Foundation; either
   11.11 +    version 2 of the License, or (at your option) any later version.
   11.12 +
   11.13 +    This library is distributed in the hope that it will be useful,
   11.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   11.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   11.16 +    Library General Public License for more details.
   11.17 +
   11.18 +    You should have received a copy of the GNU Library General Public
   11.19 +    License along with this library; if not, write to the Free
   11.20 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   11.21 +
   11.22 +    Sam Lantinga
   11.23 +    slouken@libsdl.org
   11.24 +*/
   11.25 +
   11.26 +#ifdef SAVE_RCSID
   11.27 +static char rcsid =
   11.28 + "@(#) $Id$";
   11.29 +#endif
   11.30 +
   11.31 +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
   11.32 +/* System dependent library loading routines                           */
   11.33 +/* Note: This API isn't meant for public release until SDL 1.3         */
   11.34 +
   11.35 +#ifndef _SDL_loadso_h
   11.36 +#define _SDL_loadso_h
   11.37 +
   11.38 +#include "begin_code.h"
   11.39 +/* Set up for C function definitions, even when using C++ */
   11.40 +#ifdef __cplusplus
   11.41 +extern "C" {
   11.42 +#endif
   11.43 +
   11.44 +/* This function dynamically loads a shared object and returns a pointer
   11.45 + * to the object handle (or NULL if there was an error).
   11.46 + * The 'sofile' parameter is a system dependent name of the object file.
   11.47 + */
   11.48 +extern DECLSPEC void *SDL_LoadObject(const char *sofile);
   11.49 +
   11.50 +/* Given an object handle, this function looks up the address of the
   11.51 + * named function in the shared object and returns it.  This address
   11.52 + * is no longer valid after calling SDL_UnloadObject().
   11.53 + */
   11.54 +extern DECLSPEC void *SDL_LoadFunction(void *handle, const char *name);
   11.55 +
   11.56 +/* Unload a shared object from memory */
   11.57 +extern DECLSPEC void SDL_UnloadObject(void *handle);
   11.58 +
   11.59 +/* Ends C function definitions when using C++ */
   11.60 +#ifdef __cplusplus
   11.61 +}
   11.62 +#endif
   11.63 +#include "close_code.h"
   11.64 +
   11.65 +#endif /* _SDL_loadso_h */
    12.1 --- a/src/main/beos/exports/Makefile	Wed Mar 06 05:37:21 2002 +0000
    12.2 +++ b/src/main/beos/exports/Makefile	Wed Mar 06 11:05:47 2002 +0000
    12.3 @@ -12,7 +12,6 @@
    12.4  	../../../../include/SDL_joystick.h \
    12.5  	../../../../include/SDL_keyboard.h \
    12.6  	../../../../include/SDL_keysym.h \
    12.7 -	../../../../include/SDL_loadso.h \
    12.8  	../../../../include/SDL_main.h \
    12.9  	../../../../include/SDL_mouse.h \
   12.10  	../../../../include/SDL_mutex.h \
    13.1 --- a/src/main/beos/exports/SDL.exp	Wed Mar 06 05:37:21 2002 +0000
    13.2 +++ b/src/main/beos/exports/SDL.exp	Wed Mar 06 11:05:47 2002 +0000
    13.3 @@ -74,9 +74,6 @@
    13.4  _SDL_GetModState
    13.5  _SDL_SetModState
    13.6  _SDL_GetKeyName
    13.7 -_SDL_LoadObject
    13.8 -_SDL_LoadFunction
    13.9 -_SDL_UnloadObject
   13.10  _SDL_SetModuleHandle
   13.11  _SDL_RegisterApp
   13.12  _SDL_InitQuickDraw
   13.13 @@ -147,8 +144,6 @@
   13.14  _SDL_FreeSurface
   13.15  _SDL_LockSurface
   13.16  _SDL_UnlockSurface
   13.17 -_SDL_LockRect
   13.18 -_SDL_UnlockRect
   13.19  _SDL_LoadBMP_RW
   13.20  _SDL_SaveBMP_RW
   13.21  _SDL_SetColorKey
    14.1 --- a/src/main/macos/exports/Makefile	Wed Mar 06 05:37:21 2002 +0000
    14.2 +++ b/src/main/macos/exports/Makefile	Wed Mar 06 11:05:47 2002 +0000
    14.3 @@ -14,7 +14,6 @@
    14.4  	../../../../include/SDL_joystick.h \
    14.5  	../../../../include/SDL_keyboard.h \
    14.6  	../../../../include/SDL_keysym.h \
    14.7 -	../../../../include/SDL_loadso.h \
    14.8  	../../../../include/SDL_mouse.h \
    14.9  	../../../../include/SDL_mutex.h \
   14.10  	../../../../include/SDL_quit.h \
    15.1 --- a/src/main/macos/exports/SDL.x	Wed Mar 06 05:37:21 2002 +0000
    15.2 +++ b/src/main/macos/exports/SDL.x	Wed Mar 06 11:05:47 2002 +0000
    15.3 @@ -76,9 +76,6 @@
    15.4  	SDL_GetModState
    15.5  	SDL_SetModState
    15.6  	SDL_GetKeyName
    15.7 -	SDL_LoadObject
    15.8 -	SDL_LoadFunction
    15.9 -	SDL_UnloadObject
   15.10  	SDL_GetMouseState
   15.11  	SDL_GetRelativeMouseState
   15.12  	SDL_WarpMouse
   15.13 @@ -146,8 +143,6 @@
   15.14  	SDL_FreeSurface
   15.15  	SDL_LockSurface
   15.16  	SDL_UnlockSurface
   15.17 -	SDL_LockRect
   15.18 -	SDL_UnlockRect
   15.19  	SDL_LoadBMP_RW
   15.20  	SDL_SaveBMP_RW
   15.21  	SDL_SetColorKey
    16.1 --- a/src/main/macosx/exports/Makefile	Wed Mar 06 05:37:21 2002 +0000
    16.2 +++ b/src/main/macosx/exports/Makefile	Wed Mar 06 11:05:47 2002 +0000
    16.3 @@ -13,7 +13,6 @@
    16.4  	../../../../include/SDL_joystick.h \
    16.5  	../../../../include/SDL_keyboard.h \
    16.6  	../../../../include/SDL_keysym.h \
    16.7 -	../../../../include/SDL_loadso.h \
    16.8  	../../../../include/SDL_mouse.h \
    16.9  	../../../../include/SDL_mutex.h \
   16.10  	../../../../include/SDL_quit.h \
    17.1 --- a/src/main/macosx/exports/SDL.x	Wed Mar 06 05:37:21 2002 +0000
    17.2 +++ b/src/main/macosx/exports/SDL.x	Wed Mar 06 11:05:47 2002 +0000
    17.3 @@ -74,9 +74,6 @@
    17.4  	_SDL_GetModState
    17.5  	_SDL_SetModState
    17.6  	_SDL_GetKeyName
    17.7 -	_SDL_LoadObject
    17.8 -	_SDL_LoadFunction
    17.9 -	_SDL_UnloadObject
   17.10  	_SDL_GetMouseState
   17.11  	_SDL_GetRelativeMouseState
   17.12  	_SDL_WarpMouse
   17.13 @@ -144,8 +141,6 @@
   17.14  	_SDL_FreeSurface
   17.15  	_SDL_LockSurface
   17.16  	_SDL_UnlockSurface
   17.17 -	_SDL_LockRect
   17.18 -	_SDL_UnlockRect
   17.19  	_SDL_LoadBMP_RW
   17.20  	_SDL_SaveBMP_RW
   17.21  	_SDL_SetColorKey
    18.1 --- a/src/main/win32/exports/Makefile	Wed Mar 06 05:37:21 2002 +0000
    18.2 +++ b/src/main/win32/exports/Makefile	Wed Mar 06 11:05:47 2002 +0000
    18.3 @@ -13,7 +13,6 @@
    18.4  	../../../../include/SDL_joystick.h \
    18.5  	../../../../include/SDL_keyboard.h \
    18.6  	../../../../include/SDL_keysym.h \
    18.7 -	../../../../include/SDL_loadso.h \
    18.8  	../../../../include/SDL_main.h \
    18.9  	../../../../include/SDL_mouse.h \
   18.10  	../../../../include/SDL_mutex.h \
    19.1 --- a/src/main/win32/exports/SDL.def	Wed Mar 06 05:37:21 2002 +0000
    19.2 +++ b/src/main/win32/exports/SDL.def	Wed Mar 06 11:05:47 2002 +0000
    19.3 @@ -74,9 +74,6 @@
    19.4  	SDL_GetModState
    19.5  	SDL_SetModState
    19.6  	SDL_GetKeyName
    19.7 -	SDL_LoadObject
    19.8 -	SDL_LoadFunction
    19.9 -	SDL_UnloadObject
   19.10  	SDL_SetModuleHandle
   19.11  	SDL_RegisterApp
   19.12  	SDL_InitQuickDraw
   19.13 @@ -147,8 +144,6 @@
   19.14  	SDL_FreeSurface
   19.15  	SDL_LockSurface
   19.16  	SDL_UnlockSurface
   19.17 -	SDL_LockRect
   19.18 -	SDL_UnlockRect
   19.19  	SDL_LoadBMP_RW
   19.20  	SDL_SaveBMP_RW
   19.21  	SDL_SetColorKey
    20.1 --- a/src/video/SDL_surface.c	Wed Mar 06 05:37:21 2002 +0000
    20.2 +++ b/src/video/SDL_surface.c	Wed Mar 06 11:05:47 2002 +0000
    20.3 @@ -630,10 +630,6 @@
    20.4   */
    20.5  int SDL_LockSurface (SDL_Surface *surface)
    20.6  {
    20.7 -	if ( surface->locked < 0 ) {
    20.8 -		SDL_SetError("Surface has a rectangle lock");
    20.9 -		return(-1);
   20.10 -	}
   20.11  	if ( ! surface->locked ) {
   20.12  		/* Perform the lock */
   20.13  		if ( surface->flags & (SDL_HWSURFACE|SDL_ASYNCBLIT) ) {
   20.14 @@ -657,78 +653,6 @@
   20.15  	/* Ready to go.. */
   20.16  	return(0);
   20.17  }
   20.18 -int SDL_LockRect (SDL_Surface *surface, SDL_Rect *rect, void **pixels, int *pitch)
   20.19 -{
   20.20 -	int retval = 0;
   20.21 -
   20.22 -	/* Check to see if the surface is already locked */
   20.23 -	*pixels = NULL;
   20.24 -	if ( surface->locked != 0 ) {
   20.25 -		SDL_SetError("Surface is already locked");
   20.26 -		return(-1);
   20.27 -	}
   20.28 -
   20.29 -	/* Clip the lock to the clipping rectangle of the surface */
   20.30 -	{
   20.31 -	        SDL_Rect *clip = &surface->clip_rect;
   20.32 -		int dx, dy;
   20.33 -		int h = rect->h;
   20.34 -		int w = rect->w;
   20.35 -
   20.36 -		dx = clip->x - rect->x;
   20.37 -		if(dx > 0) {
   20.38 -			w -= dx;
   20.39 -			rect->x += dx;
   20.40 -		}
   20.41 -		dx = rect->x + w - clip->x - clip->w;
   20.42 -		if(dx > 0)
   20.43 -			w -= dx;
   20.44 -
   20.45 -		dy = clip->y - rect->y;
   20.46 -		if(dy > 0) {
   20.47 -			h -= dy;
   20.48 -			rect->y += dy;
   20.49 -		}
   20.50 -		dy = rect->y + h - clip->y - clip->h;
   20.51 -		if(dy > 0)
   20.52 -			h -= dy;
   20.53 -
   20.54 -		if(w > 0 && h > 0) {
   20.55 -			rect->w = w;
   20.56 -			rect->h = h;
   20.57 -		} else {
   20.58 -			rect->w = 0;
   20.59 -			rect->h = 0;
   20.60 -			SDL_SetError("Rectangle was clipped");
   20.61 -			return(-1);
   20.62 -		}
   20.63 -	}
   20.64 -
   20.65 -	/* Perform the lock */
   20.66 -	if ( surface->flags & (SDL_HWSURFACE|SDL_ASYNCBLIT) ) {
   20.67 -		SDL_VideoDevice *video = current_video;
   20.68 -		SDL_VideoDevice *this  = current_video;
   20.69 -		if ( video->LockHWSurfaceRect ) {
   20.70 -			retval = video->LockHWSurfaceRect(this, surface, rect, pixels, pitch);
   20.71 -			if ( retval == 0 ) {
   20.72 -				surface->locked = -1;
   20.73 -				return 0;
   20.74 -			}
   20.75 -		}
   20.76 -	}
   20.77 -	if ( SDL_MUSTLOCK(surface) ) {
   20.78 -		retval = SDL_LockSurface(surface);
   20.79 -		if ( retval < 0 ) {
   20.80 -			return retval;
   20.81 -		}
   20.82 -	}
   20.83 -	surface->locked = -1;
   20.84 -	*pixels = (Uint8 *)surface->pixels + rect->y * surface->pitch + rect->x * surface->format->BytesPerPixel;
   20.85 -	*pitch = surface->pitch;
   20.86 -
   20.87 -	/* Ready to go.. */
   20.88 -	return(0);
   20.89 -}
   20.90  /*
   20.91   * Unlock a previously locked surface
   20.92   * -- Do not call this from any blit function, as SDL_DrawCursor() may recurse
   20.93 @@ -739,9 +663,6 @@
   20.94  void SDL_UnlockSurface (SDL_Surface *surface)
   20.95  {
   20.96  	/* Only perform an unlock if we are locked */
   20.97 -	if ( surface->locked < 0 ) {
   20.98 -		return;
   20.99 -	}
  20.100  	if ( ! surface->locked || (--surface->locked > 0) ) {
  20.101  		return;
  20.102  	}
  20.103 @@ -762,29 +683,6 @@
  20.104  		}
  20.105  	}
  20.106  }
  20.107 -void SDL_UnlockRect (SDL_Surface *surface)
  20.108 -{
  20.109 -	/* Only perform an unlock if we are locked */
  20.110 -	if ( surface->locked != -1 ) {
  20.111 -		return;
  20.112 -	}
  20.113 -
  20.114 -	/* Perform the unlock */
  20.115 -	if ( surface->flags & (SDL_HWSURFACE|SDL_ASYNCBLIT) ) {
  20.116 -		SDL_VideoDevice *video = current_video;
  20.117 -		SDL_VideoDevice *this  = current_video;
  20.118 -		if ( video->LockHWSurfaceRect ) {
  20.119 -			video->UnlockHWSurfaceRect(this, surface);
  20.120 -			return;
  20.121 -		}
  20.122 -	}
  20.123 -	if ( SDL_MUSTLOCK(surface) ) {
  20.124 -		surface->locked = 1;
  20.125 -		SDL_UnlockSurface(surface);
  20.126 -	} else {
  20.127 -		surface->locked = 0;
  20.128 -	}
  20.129 -}
  20.130  
  20.131  /* 
  20.132   * Convert a surface into the specified pixel format.
    21.1 --- a/src/video/SDL_sysvideo.h	Wed Mar 06 05:37:21 2002 +0000
    21.2 +++ b/src/video/SDL_sysvideo.h	Wed Mar 06 11:05:47 2002 +0000
    21.3 @@ -153,8 +153,6 @@
    21.4  	/* Returns a readable/writable surface */
    21.5  	int (*LockHWSurface)(_THIS, SDL_Surface *surface);
    21.6  	void (*UnlockHWSurface)(_THIS, SDL_Surface *surface);
    21.7 -	int (*LockHWSurfaceRect)(_THIS, SDL_Surface *surface, SDL_Rect *rect, void **pixels, int *pitch);
    21.8 -	void (*UnlockHWSurfaceRect)(_THIS, SDL_Surface *surface);
    21.9  
   21.10  	/* Performs hardware flipping */
   21.11  	int (*FlipHWSurface)(_THIS, SDL_Surface *surface);
    22.1 --- a/src/video/windx5/SDL_dx5video.c	Wed Mar 06 05:37:21 2002 +0000
    22.2 +++ b/src/video/windx5/SDL_dx5video.c	Wed Mar 06 11:05:47 2002 +0000
    22.3 @@ -421,7 +421,6 @@
    22.4  static int DX5_SetHWColorKey(_THIS, SDL_Surface *surface, Uint32 key);
    22.5  static int DX5_SetHWAlpha(_THIS, SDL_Surface *surface, Uint8 alpha);
    22.6  static int DX5_LockHWSurface(_THIS, SDL_Surface *surface);
    22.7 -static int DX5_LockHWSurfaceRect(_THIS, SDL_Surface *surface, SDL_Rect *rect, void **pixels, int *pitch);
    22.8  static void DX5_UnlockHWSurface(_THIS, SDL_Surface *surface);
    22.9  static int DX5_FlipHWSurface(_THIS, SDL_Surface *surface);
   22.10  static void DX5_FreeHWSurface(_THIS, SDL_Surface *surface);
   22.11 @@ -592,9 +591,7 @@
   22.12  	device->SetHWColorKey = DX5_SetHWColorKey;
   22.13  	device->SetHWAlpha = DX5_SetHWAlpha;
   22.14  	device->LockHWSurface = DX5_LockHWSurface;
   22.15 -	device->LockHWSurfaceRect = DX5_LockHWSurfaceRect;
   22.16  	device->UnlockHWSurface = DX5_UnlockHWSurface;
   22.17 -	device->UnlockHWSurfaceRect = DX5_UnlockHWSurface;
   22.18  	device->FlipHWSurface = DX5_FlipHWSurface;
   22.19  	device->FreeHWSurface = DX5_FreeHWSurface;
   22.20  #ifdef IID_IDirectDrawGammaControl
   22.21 @@ -1913,43 +1910,6 @@
   22.22  	surface->pixels = ddsd.lpSurface;
   22.23  	return(0);
   22.24  }
   22.25 -static int DX5_LockHWSurfaceRect(_THIS, SDL_Surface *surface, SDL_Rect *rect, void **pixels, int *pitch)
   22.26 -{
   22.27 -	HRESULT result;
   22.28 -	LPDIRECTDRAWSURFACE3 dd_surface;
   22.29 -	DDSURFACEDESC ddsd;
   22.30 -	RECT ddrect;
   22.31 -
   22.32 -	/* Calculate the lock rectangle */
   22.33 -	ddrect.top    = rect->y;
   22.34 -	ddrect.bottom = rect->y+rect->h;
   22.35 -	ddrect.left   = rect->x;
   22.36 -	ddrect.right  = rect->x+rect->w;
   22.37 -
   22.38 -	/* Lock and load! */
   22.39 -	dd_surface = surface->hwdata->dd_writebuf;
   22.40 -	memset(&ddsd, 0, sizeof(ddsd));
   22.41 -	ddsd.dwSize = sizeof(ddsd);
   22.42 -	result = IDirectDrawSurface3_Lock(dd_surface, &ddrect, &ddsd,
   22.43 -					(DDLOCK_NOSYSLOCK|DDLOCK_WAIT), NULL);
   22.44 -	if ( result == DDERR_SURFACELOST ) {
   22.45 -		result = IDirectDrawSurface3_Restore(
   22.46 -						surface->hwdata->dd_surface);
   22.47 -		result = IDirectDrawSurface3_Lock(dd_surface, &ddrect, &ddsd, 
   22.48 -					(DDLOCK_NOSYSLOCK|DDLOCK_WAIT), NULL);
   22.49 -	}
   22.50 -	if ( result != DD_OK ) {
   22.51 -		SetDDerror("DirectDrawSurface3::Lock", result);
   22.52 -		return(-1);
   22.53 -	}
   22.54 -	*pixels = ddsd.lpSurface;
   22.55 -#if defined(NONAMELESSUNION)
   22.56 -	*pitch = ddsd.u1.lPitch;
   22.57 -#else
   22.58 -	*pitch = (Uint16)ddsd.lPitch;
   22.59 -#endif
   22.60 -	return(0);
   22.61 -}
   22.62  
   22.63  static void DX5_UnlockHWSurface(_THIS, SDL_Surface *surface)
   22.64  {