home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
a
/
amix-dmi.zip
/
PATCH1.OPT
< prev
next >
Wrap
Text File
|
1992-08-26
|
3KB
|
127 lines
*** 1.1 1992/08/23 17:46:38
--- tigcurs.c 1992/08/23 15:59:22
***************
*** 2,7 ****
--- 2,9 ----
* Functions to manipulate the cursor on the Tiga screen
*
* 22 Jun 90 Erich Rickheit KSC Admitted responsibility
+ * Patchlevel: tigcurs.c_1.1
+ * May 92 Rick Schaeffer fixed cursor overflow problems
*/
#define NEED_EVENTS
***************
*** 61,67 ****
unsigned char *dat;
struct CursPriv *cPriv;
- pCursor->refcnt++;
width=(int)(pCursor->bits->width);
height=(int)(pCursor->bits->height);
pitch=PixmapBytePad(width,1);
--- 63,68 ----
***************
*** 83,90 ****
}
cPriv->data=dat;
! cPriv->gspcursor=(PTR)gsp_malloc(sizeof(CURSOR)*8);
! if(!cPriv->gspcursor)
{
Xfree(dat);
Xfree(cPriv);
--- 84,90 ----
}
cPriv->data=dat;
! if (tigrequest(sizeof(CURSOR)*8,&cPriv->gspcursor,1)==0)
{
Xfree(dat);
Xfree(cPriv);
***************
*** 92,104 ****
return FALSE;
}
! cPriv->gspdata=(PTR)gsp_malloc(pitch*8*height*2);
! if(!cPriv->gspdata)
{
! gsp_free(cPriv->gspcursor);
Xfree(dat);
Xfree(cPriv);
ErrorF("No GSP memory for cursor data\n");
return FALSE;
}
--- 92,104 ----
return FALSE;
}
! if (tigrequest(pitch*8*height*2,&cPriv->gspdata,1)==0)
{
! tigfree(cPriv->gspcursor);
Xfree(dat);
Xfree(cPriv);
ErrorF("No GSP memory for cursor data\n");
+ ErrorF("Asked for pitch %d,width %d,height %d\n",pitch,width,height);
return FALSE;
}
***************
*** 154,166 ****
{
struct CursPriv *cPriv=(struct CursPriv *)pCurs->devPriv[pScr->myNum];
! if(pCurs->refcnt)
{
- pCurs->refcnt--;
if(cPriv)
{
! if(cPriv->gspdata) gsp_free(cPriv->gspdata);
! if(cPriv->gspcursor) gsp_free(cPriv->gspcursor);
Xfree(cPriv->data);
Xfree(cPriv);
pCurs->devPriv[pScr->myNum]=NULL;
--- 154,170 ----
{
struct CursPriv *cPriv=(struct CursPriv *)pCurs->devPriv[pScr->myNum];
! if (pCurs->refcnt >= 0)
{
if(cPriv)
{
! if(cPriv->gspdata) {
! tigfree(cPriv->gspdata);
! }
!
! if (cPriv->gspcursor) {
! tigfree(cPriv->gspcursor);
! }
Xfree(cPriv->data);
Xfree(cPriv);
pCurs->devPriv[pScr->myNum]=NULL;
***************
*** 184,190 ****
ScreenPtr pScreen;
CursorPtr pCursor;
{
- int width,height,pitch;
struct CursPriv *cPriv;
cPriv=(struct CursPriv *)pCursor->devPriv[pScreen->myNum];
--- 188,193 ----
***************
*** 193,202 ****
ErrorF("No cursor info\n");
return FALSE;
}
-
- width=cPriv->tcurs.width;
- height=cPriv->tcurs.height;
- pitch=cPriv->tcurs.pitch/8;
set_curs_state(0);
set_curs_shape(cPriv->gspcursor);
--- 196,201 ----