aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-27 23:10:17 -0400
committerTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-27 23:10:17 -0400
commitf8c8b809e64c57d34837b09cce3b6a7fd8e5295a (patch)
treef8d58d9667b87cf6626402a027bb8470d155c87e /src
parentd6759fb2a4d46f3902ce9715a3c22f264c6c3726 (diff)
Switch 2: present unflipped; fix frame-capture orientation
The vertical flip at present was a misreading: EDEN_NX2_FRAME_CAPTURE wrote the TGA origin bit backwards (invert_y means the data is bottom-up), so captures were upside down while the screen was right. Present unflipped again.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/nx2_gsv.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/core/hle/service/nx2_gsv.h b/src/core/hle/service/nx2_gsv.h
index b027ef535d..8073e0bd96 100644
--- a/src/core/hle/service/nx2_gsv.h
+++ b/src/core/hle/service/nx2_gsv.h
@@ -632,10 +632,7 @@ private:
.height = layout.height,
.stride = static_cast<u32>(layout.pitch / 4),
.pixel_format = android::PixelFormat::Rgba8888,
- // Title 4 renders with a lower-left origin (negative viewport scale), so its image is
- // stored bottom-up and the console's compositor shows it flipped. Whether vi2 carries
- // this per present is not known yet; flip unconditionally for now.
- .transform_flags = android::BufferTransformFlags::FlipV,
+ .transform_flags = android::BufferTransformFlags::Unset,
.crop_rect = {0, 0, static_cast<int>(layout.width), static_cast<int>(layout.height)},
.blending = Tegra::BlendMode::Opaque,
.native_tiling = true,
@@ -673,7 +670,8 @@ private:
header[14] = static_cast<u8>(layout.height);
header[15] = static_cast<u8>(layout.height >> 8);
header[16] = 32;
- header[17] = invert_y ? 0x28 : 0x08;
+ // Descriptor bit 5: rows top to bottom. invert_y means the data is bottom-up.
+ header[17] = invert_y ? 0x08 : 0x28;
if (std::FILE* file = std::fopen(path.c_str(), "wb")) {
std::fwrite(header.data(), 1, header.size(), file);
std::fwrite(pixels->data(), 1, pixels->size(), file);