mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-12 12:58:34 +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;
|
||||
}
|
||||
|
||||
// Data read from viewport is in bottom-up order, suitable for BMP.
|
||||
if (!screenshot_dump(g_settings.screenshot_directory,
|
||||
buffer,
|
||||
width, height, width * 3, true))
|
||||
@ -127,6 +128,8 @@ static bool take_screenshot_raw(void)
|
||||
unsigned height = g_extern.frame_cache.height;
|
||||
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,
|
||||
data + (height - 1) * (pitch >> 1),
|
||||
width, height, -pitch, false);
|
||||
|
@ -85,7 +85,7 @@ static void dump_content(FILE *file, const void *frame,
|
||||
if (!line)
|
||||
return;
|
||||
|
||||
if (bgr24)
|
||||
if (bgr24) // BGR24 byte order. Can directly copy.
|
||||
{
|
||||
for (int j = 0; j < height; j++, frame_bgr += pitch)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user