Changeset 1036 for trunk/src/kernel32


Ignore:
Timestamp:
Sep 25, 1999, 12:47:00 AM (26 years ago)
Author:
sandervl
Message:

Cursor fixes

Location:
trunk/src/kernel32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/cvtcursor.cpp

    r816 r1036  
    1 /* $Id: cvtcursor.cpp,v 1.3 1999-09-04 12:41:45 sandervl Exp $ */
     1/* $Id: cvtcursor.cpp,v 1.4 1999-09-24 22:47:00 sandervl Exp $ */
    22
    33/*
     
    5656
    5757  cursorhdr  = (BITMAPFILEHEADER2 *)malloc(cursorsize);
     58  memset(cursorhdr, 0, cursorsize);
    5859  cursorhdr->usType        = BFT_POINTER;
    5960  cursorhdr->cbSize        = sizeof(BITMAPFILEHEADER2);
     
    6869
    6970  cursorhdr->offBits       = sizeof(BITMAPFILEHEADER2) + 2*sizeof(RGB2) + offsetBits;
    70   cursorhdr->bmp2.cbFix     = sizeof(BITMAPINFOHEADER);
     71  cursorhdr->bmp2.cbFix     = sizeof(BITMAPINFOHEADER2);
    7172  cursorhdr->bmp2.cx        = (USHORT)bhdr->biWidth;
    7273  cursorhdr->bmp2.cy        = (USHORT)(bhdr->biHeight);
    7374  cursorhdr->bmp2.cPlanes   = bhdr->biPlanes;
    7475  cursorhdr->bmp2.cBitCount = bhdr->biBitCount;
     76  cursorhdr->bmp2.ulCompression   = BCA_UNCOMP;
     77  cursorhdr->bmp2.ulColorEncoding = BCE_RGB;
    7578  dprintf(("Cursor size    : %d", bhdr->biSizeImage));
    7679  dprintf(("Cursor Width   : %d", bhdr->biWidth));
  • trunk/src/kernel32/cvtcursorgrp.cpp

    r997 r1036  
    1 /* $Id: cvtcursorgrp.cpp,v 1.4 1999-09-21 08:24:53 sandervl Exp $ */
     1/* $Id: cvtcursorgrp.cpp,v 1.5 1999-09-24 22:47:00 sandervl Exp $ */
    22
    33/*
     
    3636 CursorResDir *rdir = (CursorResDir *)(chdr + 1);
    3737 int i, groupsize = 0, os2cursorsize;
    38  BITMAPARRAYFILEHEADER *bafh, *orgbafh;
     38 BITMAPARRAYFILEHEADER2 *bafh, *orgbafh;
    3939 CursorComponent       *cursorhdr;
    4040 Win32Resource         *winres;
     
    5656        rdir++;
    5757  }
    58   bafh    = (BITMAPARRAYFILEHEADER *)malloc(groupsize+chdr->cwCount*sizeof(BITMAPARRAYFILEHEADER));
     58  bafh    = (BITMAPARRAYFILEHEADER2 *)malloc(groupsize+chdr->cwCount*sizeof(BITMAPARRAYFILEHEADER2));
    5959  orgbafh = bafh;
    6060
     
    6262  for(i=0;i<chdr->cwCount;i++) {
    6363        bafh->usType    = BFT_BITMAPARRAY;
    64         bafh->cbSize    = sizeof(BITMAPARRAYFILEHEADER);
     64        bafh->cbSize    = sizeof(BITMAPARRAYFILEHEADER2);
    6565        bafh->cxDisplay = 0;
    6666        bafh->cyDisplay = 0;
     
    7575
    7676        cursorhdr = (CursorComponent *)winres->lockResource();
    77         os2cursor = ConvertCursor(cursorhdr, winres->getSize(), &os2cursorsize, (int)bafh - (int)orgbafh + sizeof(BITMAPARRAYFILEHEADER)-sizeof(BITMAPFILEHEADER));
     77        os2cursor = ConvertCursor(cursorhdr, winres->getSize(), &os2cursorsize, (int)bafh - (int)orgbafh + sizeof(BITMAPARRAYFILEHEADER2)-sizeof(BITMAPFILEHEADER));
    7878
    7979        if(os2cursor == NULL) {
     
    8585
    8686        if(i != chdr->cwCount -1) {
    87                 bafh->offNext = (int)&bafh->bfh - (int)orgbafh + os2cursorsize;
     87                bafh->offNext = (int)&bafh->bfh2 - (int)orgbafh + os2cursorsize;
    8888        }
    8989        else    bafh->offNext = 0;
    9090
    91         memcpy((char *)&bafh->bfh, os2cursor, os2cursorsize);
     91        memcpy((char *)&bafh->bfh2, os2cursor, os2cursorsize);
    9292        free(os2cursor);
    9393
    94         bafh = (BITMAPARRAYFILEHEADER *)((int)&bafh->bfh + os2cursorsize);
     94        bafh = (BITMAPARRAYFILEHEADER2 *)((int)&bafh->bfh2 + os2cursorsize);
    9595        delete winres;
    9696
Note: See TracChangeset for help on using the changeset viewer.