mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-03-04 09:27:15 +00:00
Add some clarifying comments on screenshots.
This commit is contained in:
parent
553b1d640a
commit
9e650a9540
@ -109,6 +109,7 @@ static bool take_screenshot_viewport(void)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Data read from viewport is in bottom-up order, suitable for BMP.
|
||||||
if (!screenshot_dump(g_settings.screenshot_directory,
|
if (!screenshot_dump(g_settings.screenshot_directory,
|
||||||
buffer,
|
buffer,
|
||||||
width, height, width * 3, true))
|
width, height, width * 3, true))
|
||||||
@ -127,6 +128,8 @@ static bool take_screenshot_raw(void)
|
|||||||
unsigned height = g_extern.frame_cache.height;
|
unsigned height = g_extern.frame_cache.height;
|
||||||
int pitch = g_extern.frame_cache.pitch;
|
int pitch = g_extern.frame_cache.pitch;
|
||||||
|
|
||||||
|
// Negative pitch is needed as screenshot takes bottom-up,
|
||||||
|
// but we use top-down.
|
||||||
return screenshot_dump(g_settings.screenshot_directory,
|
return screenshot_dump(g_settings.screenshot_directory,
|
||||||
data + (height - 1) * (pitch >> 1),
|
data + (height - 1) * (pitch >> 1),
|
||||||
width, height, -pitch, false);
|
width, height, -pitch, false);
|
||||||
|
@ -85,7 +85,7 @@ static void dump_content(FILE *file, const void *frame,
|
|||||||
if (!line)
|
if (!line)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (bgr24)
|
if (bgr24) // BGR24 byte order. Can directly copy.
|
||||||
{
|
{
|
||||||
for (int j = 0; j < height; j++, frame_bgr += pitch)
|
for (int j = 0; j < height; j++, frame_bgr += pitch)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user