Fixed a bug in grLfbLock. For write locks, the code returned the

address of the LFB, not the address of the buffer.  This may be the
Windows behavior, but it's not the behavior we expect in Linux.  I
changed the Linux behavior, and left the Windows behavior alone.
This commit is contained in:
billwhite
2000-07-19 23:52:33 +00:00
parent 0e95fce6bf
commit 078484397f

View File

@@ -686,10 +686,16 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer,
}
#endif
else {
info->lfbPtr = (void *)gc->lfb_ptr;
#ifdef __linux__
/*
* For Linux, we just return the correct address and
* stride.
*/
info->strideInBytes = gc->bInfo->buffInfo.bufLfbStride;
#endif /* defined(__linux__) */
info->lfbPtr = (void *)gc->lfbBuffers[colBufferIndex];
#else /* defined(__linux__) */
info->lfbPtr = (void *)gc->lfb_ptr;
#endif /* defined(__linux__) */
switch (writeMode) {
case GR_LFBWRITEMODE_565_DEPTH:
case GR_LFBWRITEMODE_555_DEPTH:
@@ -776,7 +782,16 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer,
/* Make sure dither rotation is disabled for 3D LFBs. */
_3dlfb = FXTRUE;
#if defined(__linux__)
/*
* For Linux, we just return the correct address and
* stride.
*/
info->strideInBytes = gc->bInfo->buffInfo.bufLfbStride;
info->lfbPtr = (void *)gc->lfbBuffers[colBufferIndex];
#else /* defined(__linux__) */
info->lfbPtr = (void *)gc->lfb_ptr;
#endif /* defined(__linux__) */
switch (writeMode) {
case GR_LFBWRITEMODE_565_DEPTH: