/[rdesktop]/jpeg/rdesktop/trunk/cache.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /jpeg/rdesktop/trunk/cache.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 15 by matty, Tue Aug 15 10:23:24 2000 UTC revision 16 by matty, Thu Sep 28 07:04:14 2000 UTC
# Line 154  void cache_put_text(uint8 cache_id, void Line 154  void cache_put_text(uint8 cache_id, void
154  static uint8 deskcache[0x38400];  static uint8 deskcache[0x38400];
155    
156  /* Retrieve desktop data from the cache */  /* Retrieve desktop data from the cache */
157  uint8 *cache_get_desktop(uint32 offset, uint32 length)  uint8 *cache_get_desktop(uint32 offset, int cx, int cy)
158  {  {
159            int length = cx * cy;
160    
161          if ((offset + length) <= sizeof(deskcache))          if ((offset + length) <= sizeof(deskcache))
162          {          {
163                  return &deskcache[offset];                  return &deskcache[offset];
# Line 166  uint8 *cache_get_desktop(uint32 offset, Line 168  uint8 *cache_get_desktop(uint32 offset,
168  }  }
169    
170  /* Store desktop data in the cache */  /* Store desktop data in the cache */
171  void cache_put_desktop(uint32 offset, uint32 length, uint8 *data)  void cache_put_desktop(uint32 offset, int cx, int cy, int scanline, uint8 *data)
172  {  {
173            int length = cx * cy;
174    
175          if ((offset + length) <= sizeof(deskcache))          if ((offset + length) <= sizeof(deskcache))
176          {          {
177                  memcpy(&deskcache[offset], data, length);                  while (cy--)
178                    {
179                            memcpy(&deskcache[offset], data, cx);
180                            data += scanline;
181                            offset += cx;
182                    }
183          }          }
184          else          else
185          {          {

Legend:
Removed from v.15  
changed lines
  Added in v.16

  ViewVC Help
Powered by ViewVC 1.1.26