From 9325e35636dd5766379a7dd76ab5438445941656 Mon Sep 17 00:00:00 2001 From: asvitkine <> Date: Wed, 28 Mar 2012 03:30:49 +0000 Subject: [PATCH] fix gamma code so that fades in Ferazel's Wand actually work --- SheepShaver/src/video.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SheepShaver/src/video.cpp b/SheepShaver/src/video.cpp index fdd9f8f0..d0eda93d 100644 --- a/SheepShaver/src/video.cpp +++ b/SheepShaver/src/video.cpp @@ -245,7 +245,7 @@ static int16 set_gamma(VidLocals *csSave, uint32 gamma) int data_width = ReadMacInt16(gamma + gDataWidth); if (data_width > 8) return paramErr; - int data_cnt = ReadMacInt16(gamma + gDataWidth); + int data_cnt = ReadMacInt16(gamma + gDataCnt); if (data_cnt != (1 << data_width)) return paramErr; @@ -366,7 +366,7 @@ static int16 VideoControl(uint32 pb, VidLocals *csSave) case cscSetGamma: { // SetGamma uint32 user_table = ReadMacInt32(param + csGTable); D(bug("SetGamma %08x\n", user_table)); - return set_gamma(csSave, ReadMacInt32(user_table)); + return set_gamma(csSave, user_table); } case cscGrayPage: { // GrayPage