aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ds/arm9/source/osystem_ds.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/ds/arm9/source/osystem_ds.cpp')
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp
index ae5d116985..6427f3c079 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.cpp
+++ b/backends/platform/ds/arm9/source/osystem_ds.cpp
@@ -504,15 +504,30 @@ Graphics::Surface *OSystem_DS::lockScreen() {
_framebuffer.create(DS::getGameWidth(), DS::getGameHeight(), 1);
// Ensure we copy using 16 bit quantities due to limitation of VRAM addressing
+<<<<<<< .working
+=======
+
+ size_t imageStrideInBytes = DS::isCpuScalerEnabled()? DS::getGameWidth() : 512;
+ size_t imageStrideInWords = imageStrideInBytes / 2;
+
+>>>>>>> .merge-right.r28656
u16* image = (u16 *) DS::get8BitBackBuffer();
for (int y = 0; y < DS::getGameHeight(); y++)
{
+<<<<<<< .working
DC_FlushRange(image + (y << 8), DS::getGameWidth());
+=======
+ DC_FlushRange(image + (y * imageStrideInWords), DS::getGameWidth());
+>>>>>>> .merge-right.r28656
for (int x = 0; x < DS::getGameWidth() >> 1; x++)
{
+<<<<<<< .working
*(((u16 *) (_framebuffer.pixels)) + y * (DS::getGameWidth() >> 1) + x) = image[y << 8 + x];
+=======
+ *(((u16 *) (surf->pixels)) + y * (DS::getGameWidth() >> 1) + x) = image[y * imageStrideInWords + x];
+>>>>>>> .merge-right.r28656
}
}