From 3f900772268e5a8233fe2d12352d8ffc31b63b63 Mon Sep 17 00:00:00 2001 From: alanh <> Date: Thu, 14 Sep 2000 08:05:44 +0000 Subject: [PATCH] fix for stride width at <=1024 resolutions --- glide3x/h5/glide3/src/glfb.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/glide3x/h5/glide3/src/glfb.c b/glide3x/h5/glide3/src/glfb.c index 038b3f5..95c7eb3 100644 --- a/glide3x/h5/glide3/src/glfb.c +++ b/glide3x/h5/glide3/src/glfb.c @@ -696,6 +696,7 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer, #else /* defined(__linux__) */ info->lfbPtr = (void *)gc->lfb_ptr; #endif /* defined(__linux__) */ +#ifndef __linux__ switch (writeMode) { case GR_LFBWRITEMODE_565_DEPTH: case GR_LFBWRITEMODE_555_DEPTH: @@ -703,19 +704,10 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer, case GR_LFBWRITEMODE_888: case GR_LFBWRITEMODE_8888: case GR_LFBWRITEMODE_Z32: -#ifndef __linux__ - /* - * Unknown why this is needed for smaller strides, - * and not needed for larger strides. - */ - if (info->strideInBytes < 0x2000) { - info->strideInBytes <<= 1; - } -#else /* defined(__linux__) */ info->strideInBytes <<= 1; -#endif /* defined(__linux__) */ break; } +#endif /* defined(__linux__) */ } REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 2, 0x3); REG_GROUP_SET(hw, colBufferAddr, gc->textureBuffer.addr ); @@ -793,6 +785,7 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer, info->lfbPtr = (void *)gc->lfb_ptr; #endif /* defined(__linux__) */ +#ifndef __linux__ switch (writeMode) { case GR_LFBWRITEMODE_565_DEPTH: case GR_LFBWRITEMODE_555_DEPTH: @@ -800,19 +793,10 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer, case GR_LFBWRITEMODE_888: case GR_LFBWRITEMODE_8888: case GR_LFBWRITEMODE_Z32: -#ifdef __linux__ - /* - * For some reason, when the stride is 0x2000, - * we don't need to shift by one. - */ - if (info->strideInBytes < 0x2000) { - info->strideInBytes <<= 1; - } -#else /* defined(__linux__) */ info->strideInBytes <<= 1; -#endif /* defined(__linux__) */ break; } +#endif /* defined(__linux__) */ } }