Wolke-Puppenspieler / glidehqplusglitch64

Automatically exported from code.google.com/p/glidehqplusglitch64
0 stars 0 forks source link

Screenshot truncation #170

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using latest official trunk, part of the bottom image including black border is 
missing(Official_1280x1024_4x3_04).
Using MyWIP with same resolution & ratio, the black border and slightly more is 
visible but still has truncation(MyWIP_1280x1024_4x3_04).
I made the following change in Main.cpp - capture_screen.
for (wxUint32 y=offset_y; y<(settings.res_y-offset_y); y++)

Even using a matched resolution ratio e.g. 1280x960, the screenshot from 
official trunk still has truncation for the bottom 
portion(Official_1280x960_4x3_04).
Using MyWIP the complete image is visible(MyWIP_1280x960_4x3_04).

It seems the correct codes is ok if offset_y for the game is 0 but truncation 
occurs when it is not 0.  Also, using unmatched resolution cause further 
truncation.

Original issue reported on code.google.com by pokefan0...@gmail.com on 5 Oct 2010 at 1:05

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
No longer required.
You can close as invalid.

Original comment by pokefan0...@gmail.com on 24 Nov 2010 at 10:46

GoogleCodeExporter commented 9 years ago
Gonetz,
If you do not want to accept this issue, please close it

Original comment by pokefan0...@gmail.com on 4 Jun 2011 at 6:55

GoogleCodeExporter commented 9 years ago
Gonetz,

Would you look into the screenshot truncation?

Below is my changes made (haven't studied the codes properly) but seems to work 
for me.

        // Copy the screen
        if (info.writeMode == GR_LFBWRITEMODE_8888)
        {
          wxUint32 col;
          for (wxUint32 y=0; y<image_height; y++) // use image_height instead of settings.res_y, use 0 instead of offset_y
          {
            wxUint32 *ptr = (wxUint32*)((wxUint8*)info.lfbPtr + offset_src);
            ptr+=0; // use 0 instead of offset_x
            for (wxUint32 x=0; x<image_width; x++) // use image_width instead of settings.res_x, use 0 instead of offset_x
            {
              col = *(ptr++);
              ssimg[sspos++] = (wxUint8)((col >> 16) & 0xFF);
              ssimg[sspos++] = (wxUint8)((col >> 8) & 0xFF);
              ssimg[sspos++] = (wxUint8)(col & 0xFF);
            }
            offset_src += info.strideInBytes;
          }
        }
        else
        {
          wxUint16 col;
          for (wxUint32 y=0; y<image_height; y++) // use image_height instead of settings.res_y, use 0 instead of offset_y
          {
            wxUint16 *ptr = (wxUint16*)((wxUint8*)info.lfbPtr + offset_src);
            ptr+=0; // use 0 instead of offset_x
            for (wxUint32 x=0; x<image_width; x++) // use image_width instead of settings.res_x, use 0 instead of offset_x
            {
              col = *(ptr++);
              ssimg[sspos++] = (wxUint8)((float)(col >> 11) / 31.0f * 255.0f);
              ssimg[sspos++] = (wxUint8)((float)((col >> 5) & 0x3F) / 63.0f * 255.0f);
              ssimg[sspos++] = (wxUint8)((float)(col & 0x1F) / 31.0f * 255.0f);
            }

Original comment by pokefan0...@gmail.com on 22 Aug 2011 at 10:40

GoogleCodeExporter commented 9 years ago
in r248, same truncation for 16:9

Original comment by pokefan0...@gmail.com on 1 Sep 2011 at 4:30

GoogleCodeExporter commented 9 years ago
Hopefully fixed in r250

Original comment by gon...@ngs.ru on 2 Sep 2011 at 7:42

GoogleCodeExporter commented 9 years ago
yes, it is fixed.
Thks

Original comment by pokefan0...@gmail.com on 2 Sep 2011 at 8:11