Ignore:
Timestamp:
Mar 16, 2008, 10:51:54 PM (11 years ago)
Author:
Sam Hocevar
Message:
  • Add lock() and unlock() methods to jimage objects. They're no-ops, but the Win32/DirectX version uses them all over the place because it uses DirectDraw? surfaces. One day we may wish to merge Abuse Win32's video output, or to use the SDL blending functions. You never know.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/glread.cpp

    r56 r115  
    4141  while (first<=last)
    4242  {
     43    sub->lock();
    4344    for (y=0;(int)y<(int)height;y++)
    4445    {
     
    4647      sub->unpack_scanline(y);
    4748    }
     49    sub->unlock();
    4850    sub->put_image(im,(first%32)*width,(first/32)*height);
    4951    first++;
     
    5557image *read_pic(char *fn, palette *&pal)
    5658{
    57   image *im;
     59  image *im = NULL;
    5860  char x[4],bpp;
    5961  uint8_t *sl=NULL,esc,c,n,marker,vmode;
     
    6163  int xx,yy;
    6264  FILE *fp;
    63   im=NULL;
    6465  fp=fopen(fn,"rb");
    6566
     
    7475  { fclose(fp); set_error(imFILE_CORRUPTED); return NULL; }
    7576
    76   im=new image(w,h);
     77  im = new image(w, h);
    7778
    7879  fread(&vmode,1,1,fp);
     
    9293
    9394  yy=h; xx=w;
     95
     96  im->lock();
    9497
    9598  while (blocks-- && w>=1 && yy>=0)
     
    137140    }
    138141  }
     142
     143  im->unlock();
     144
    139145  fclose(fp);
    140146  return im;
Note: See TracChangeset for help on using the changeset viewer.