[PATCH] Fix glReadPixels call from read_from_framebuffer

Nick Burns adger44 at hotmail.com
Sun Dec 21 00:19:44 CST 2008

Thanks for the git advice (still trying to learn git...)

I will move the variable declarations up (I am so used to warnings killing my build that I was complacent)
(I will also try and see if I can get hotmail to send email with newline characters -- not sure what it is doing to my formatting -- I choose plain text...)

 - Nick
> Date: Sun, 21 Dec 2008 17:03:55 +1100
> From: jeffzaroyko at gmail.com
> To: adger44 at hotmail.com
> Subject: Re: [PATCH] Fix glReadPixels call from read_from_framebuffer
> CC: wine-devel at winehq.org
> On Sun, Dec 21, 2008 at 4:40 PM, Nick Burns  wrote:
>> This is my last gfx fix for SHOGOThe readpixels call was putting data into the wrong place in the pbo (fixed with pixelstore)And the y-flip code was flipping the wrong data as well (set the bottom row to the bottom row and not the height'th row)
>> The code used to handle fullscreen 2d blits (or blts without any colorkey masking)However sub-blits had issues (in the pbo path) 1 - readpixels read into the wrong part of the pbo 2 - the y-flip code would move around the uninited data (from the readpixels) and it read from the wrong place 3 - After 1 and 2 the pbo is corrupt and the blt code later had no chance...
>> This patch fixes 1 and 2 -- letting the blt code shineThis can be seen in the SHOGO menu (now not corrupt!)
>> Changelog Fix glReadPixels call from read_from_framebuffer Fix the call to readpixels so that 2d blts going thru the pbo path end up in the right place and get flipped correctly
>> - Nick
> Hi
> + GLint rowLen = 0;
> + GLint skipPix = 0;
> + GLint skipRow = 0;
> You're declaring variables in a place which is not the start of a
> block, this isn't legal in ANSI C/C90 as gcc points out:
> surface.c: In function 'read_from_framebuffer':
> surface.c:786: warning: ISO C90 forbids mixed declarations and code
> Also it looks like your email address is not correct in this patch?
> From: Nick Burns 
> git repo-config user.email "me at example.com"
> -Jeff

More information about the wine-devel mailing list