Project

General

Profile

Actions

Emulator Issues #1186

closed

Screenshots are clipped at the top

Added by BhaaL almost 15 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

What steps will reproduce the problem?

  1. Run any game with a custom solution (in my case, Starfox Assault on
    1680x1050)
  2. Hit F9 to take a screenshot

What is the expected output? What do you see instead?
Expected is a screenshot with 1680x1050px that contains the same image i
see on screen.
Instead I get a 1680x1050px image that has 1680x980 filled with the screen,
the bottom is black.

What version of the product are you using? On what operating system?
r3879 JitIL Build with OGL Plugin on WinXP SP2 32-bit

Please provide any additional information below.
I modified Render.cpp to tell me the size of the XFB:

Index: I:/Dolphin/svn/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp

--- I:/Dolphin/svn/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp (revision
3879)
+++ I:/Dolphin/svn/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp (working copy)
@@ -893,7 +893,7 @@
glFramebufferTexture2DEXT(GL_READ_FRAMEBUFFER_EXT,
GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_RECTANGLE_ARB, xfbSource->texture, 0);

	s_criticalScreenshot.Enter();
  •   // Save screenshot
    
  •    // Save screenshot
      SaveRenderTarget(s_sScreenshotName.c_str(),
    

xfbSource->sourceRc.GetWidth(), xfbSource->sourceRc.GetHeight(), yOffset);
// Reset settings
s_sScreenshotName = "";
@@ -902,6 +902,7 @@

	glFramebufferTexture2DEXT(GL_READ_FRAMEBUFFER_EXT,

GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_RECTANGLE_ARB, 0, 0);
glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT,
s_framebufferManager.GetEFBFramebuffer());

  •    OSD::AddMessage(StringFromFormat("xfbSource: %dx%d; yOffset: %d",
    

xfbSource->sourceRc.GetWidth(), xfbSource->sourceRc.GetHeight(),
yOffset).c_str(), 2000);
}

// Frame dumps are handled a little differently in Windows

xfbSource is 1680x980, yOffset is 0. I'd expect xfbSource to be 1680x1050
or the likes, but for some reason the top 70px are clipped off.
See this image as example:
[URL=http://s385.photobucket.com/albums/oo295/BhaaLseN/dolphin/?action=view&current=GF7E01-7.jpg][IMG]http://i385.photobucket.com/albums/oo295/BhaaLseN/dolphin/th_GF7E01-7.jpg[/IMG][/URL]
The top part is missing (where the Hit Counter usually sits), while the
bottom part is black.
Surprisingly, the black bar at the bottom is about 174px in height, which
amounts to 1154px if i add it to the 980px from earlier.

Actions #1

Updated by BhaaL almost 15 years ago

Uh, guess Googlecode doesnt like lines this long.
The Diff is screwed, but i guess you can see what it does.

Also, the image is here (again):
http://i385.photobucket.com/albums/oo295/BhaaLseN/dolphin/GF7E01-7.jpg

Actions #2

Updated by sskkiipp almost 15 years ago

It seems that the yOffset is wrong for the screenshots, as well as Framedump. Another
thing is that 1680x1050 will give you a picture of 1595x???.
Better use the same resolution like 1600x900 if you choose 16:9 in Wii Config.
Otherwise the picture will have a faulty aspect ratio.

Anyway, here's a fix for the screenshot issue :)

Actions #3

Updated by sskkiipp almost 15 years ago

^^ @ Devs :) feel free to add it :)

Actions #4

Updated by sskkiipp almost 15 years ago

This is an example : res 1600x900 will create a 1520x912 pic on MK Wii. But the ar is
right and the image doesn't have black borders. Resizing in by wx is a bad idea since
the image gets blurry. Better safe it this way and upscale it to 1680x1050 with your
fav photoprog.

Actions #5

Updated by BhaaL almost 15 years ago

I'm not so sure if your patch is that good.
It does make the screenshot look a bit better, but I get similar (if not even better)
results with that:
http://pastie.org/559446

Its still not correct, but the top is there as it should, except the bottom being
black still. I suppose that black bar is due to aspect ratio or something, altho it
does not show up on the screen while playing.

Actions #6

Updated by sskkiipp almost 15 years ago

^^ :) the result should be the same. You just have the border at the bottom because
the REAL picture is not the same height you choosed in the gfx config. The xfbwidth
and height is the real size :)

These lines :

  • if (!(g_Config.bNativeResolution || g_Config.b2xResolution))
  •   sscanf(g_Config.iInternalRes, "%dx%d", &W, &H);
    

overwrite the xfbvalues for non native and 2x res and make the picture become to big.
you can try the native res and will have no borders :)

Actions #7

Updated by BhaaL almost 15 years ago

I kept those lines on purpose, since they shouldnt cause that kind of problem here.
The size is indeed different from the xfb size, but shouldnt that be the same as is
displayed in the game window?

Actions #8

Updated by sskkiipp almost 15 years ago

:) you know the real size of the game window ? it seems that it really is xfbwidth
and height, isnt it ?

Actions #9

Updated by sskkiipp over 14 years ago

Maybe its possible to scale the correct screenshot from my patch with some ogl function ?

Actions #10

Updated by marcus over 14 years ago

  • Status changed from New to Accepted

sskkiipp: Thanks for the patch, but the picture violates the third rule here:
http://code.google.com/p/dolphin-emu/wiki/GoogleCodeRules#Issues

It would be great if you could delete that attachment...

Actions #11

Updated by sskkiipp over 14 years ago

sorry, for that. deleted the picture ;)

Actions #12

Updated by sl1nk3.s over 14 years ago

  • Status changed from Accepted to Fixed

should be fixed in r3899, thanks for the descriptive issue, that's so rare around here :P

Actions

Also available in: Atom PDF