src/SDL12_compat.c
changeset 76 76970160f0fb
parent 75 00631178b6d5
child 77 ce9a1f04bb36
     1.1 --- a/src/SDL12_compat.c	Wed Feb 20 11:56:19 2019 -0500
     1.2 +++ b/src/SDL12_compat.c	Wed Feb 20 11:56:40 2019 -0500
     1.3 @@ -2037,6 +2037,23 @@
     1.4      return SDL20_Unsupported();
     1.5  }
     1.6  
     1.7 +DECLSPEC int SDLCALL
     1.8 +SDL_LockSurface(SDL12_Surface *surface12)
     1.9 +{
    1.10 +    const int retval = SDL20_LockSurface(surface12->surface20);
    1.11 +    surface12->pixels = surface12->surface20->pixels;
    1.12 +    surface12->pitch = surface12->surface20->pitch;
    1.13 +    return retval;
    1.14 +}
    1.15 +
    1.16 +DECLSPEC void SDLCALL
    1.17 +SDL_UnlockSurface(SDL12_Surface *surface12)
    1.18 +{
    1.19 +    SDL20_UnlockSurface(surface12->surface20);
    1.20 +    surface12->pixels = surface12->surface20->pixels;
    1.21 +    surface12->pitch = surface12->surface20->pitch;
    1.22 +}
    1.23 +
    1.24  DECLSPEC SDL12_Surface * SDLCALL
    1.25  SDL_ConvertSurface(SDL12_Surface *src12, const SDL12_PixelFormat *format12, Uint32 flags12)
    1.26  {