Changeset 9156 for trunk/src


Ignore:
Timestamp:
Aug 28, 2002, 10:21:48 AM (23 years ago)
Author:
sandervl
Message:

PF: Added custom function to hide mouse cursor when the primary surface (screen) is locked by the app to prevent display corruption with color/animated mouse pointers

Location:
trunk/src/ddraw
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ddraw/OS2DDRAW.CPP

    r8989 r9156  
    1 /* $Id: OS2DDRAW.CPP,v 1.36 2002-08-12 15:06:21 sandervl Exp $ */
     1/* $Id: OS2DDRAW.CPP,v 1.37 2002-08-28 08:20:04 sandervl Exp $ */
    22
    33/*
     
    4646
    4747
    48 BOOL bUseFSDD = FALSE;
    49 BOOL fNoFSDD = FALSE;
     48BOOL bUseFSDD          = FALSE;
     49BOOL fNoFSDD           = FALSE;
     50BOOL fHideCursorOnLock = FALSE;
    5051
    5152FOURCC SupportedFourCCs[]   = {FOURCC_SCRN,FOURCC_LUT8,FOURCC_R565,FOURCC_RGB3,FOURCC_RGB4};
     
    6869    ModesDive[0].iRatio = 0;
    6970    fNoFSDD = TRUE;
     71}
     72//******************************************************************************
     73//Force DirectSurface Lock & Unlock methods to hide & show the mouse cursor
     74//******************************************************************************
     75BOOL WIN32API SetCustomHideCursorOnLock(BOOL state)
     76{
     77    BOOL preState = fHideCursorOnLock;
     78    fHideCursorOnLock = state;
     79    return preState;
    7080}
    7181//******************************************************************************
  • trunk/src/ddraw/OS2DDRAW.H

    r8604 r9156  
    1 /* $Id: OS2DDRAW.H,v 1.16 2002-06-08 13:12:33 sandervl Exp $ */
     1/* $Id: OS2DDRAW.H,v 1.17 2002-08-28 08:20:05 sandervl Exp $ */
    22
    33/*
     
    219219#define FOURCC_UYVY  mmioFOURCC( 'U', 'Y', 'V', 'Y' )
    220220
     221extern BOOL fHideCursorOnLock;
     222
    221223#endif
  • trunk/src/ddraw/OS2SURFACE.CPP

    r8830 r9156  
    1 /* $Id: OS2SURFACE.CPP,v 1.46 2002-07-03 15:44:37 sandervl Exp $ */
     1/* $Id: OS2SURFACE.CPP,v 1.47 2002-08-28 08:20:05 sandervl Exp $ */
    22
    33/*
     
    48904890#endif
    48914891    me->fLocked = TRUE;
     4892
     4893    if(me->diveBufNr == DIVE_BUFFER_SCREEN)
     4894    {
     4895        //If fHideCursorOnLock is set, then we hide the cursor to prevent
     4896        //the app from corruption the mouse cursor (color/animated pointers)
     4897        if(fHideCursorOnLock) ShowCursor(FALSE);
     4898    }
    48924899  }
    48934900
     
    53345341
    53355342    rc = DD_OK;
     5343
     5344    if(me->diveBufNr == DIVE_BUFFER_SCREEN)
     5345    {
     5346        //If fHideCursorOnLock is set, then we hide the cursor to prevent in SurfLock4
     5347        //the app from corruption the mouse cursor (color/animated pointers)
     5348        //We need to show it again here
     5349        if(fHideCursorOnLock) ShowCursor(TRUE);
     5350    }
    53365351  }
    53375352
     
    54415456    dprintf(("DDRAW: Unlock OK\n\n"));
    54425457    rc = DD_OK;
    5443 
    54445458  }
    54455459
Note: See TracChangeset for help on using the changeset viewer.