[Scummvm-cvs-logs] SF.net SVN: scummvm: [27515] scummvm/trunk/backends/platform/ds/arm9/source /dsmain.cpp
tramboi at users.sourceforge.net
tramboi at users.sourceforge.net
Sun Jun 17 21:37:08 CEST 2007
Revision: 27515
http://scummvm.svn.sourceforge.net/scummvm/?rev=27515&view=rev
Author: tramboi
Date: 2007-06-17 12:37:07 -0700 (Sun, 17 Jun 2007)
Log Message:
-----------
NDS: setKeyboardEnable shouldn't overrun VRAM anymore when CPU scaler is on
Modified Paths:
--------------
scummvm/trunk/backends/platform/ds/arm9/source/dsmain.cpp
Modified: scummvm/trunk/backends/platform/ds/arm9/source/dsmain.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/dsmain.cpp 2007-06-17 17:17:38 UTC (rev 27514)
+++ scummvm/trunk/backends/platform/ds/arm9/source/dsmain.cpp 2007-06-17 19:37:07 UTC (rev 27515)
@@ -1018,11 +1018,19 @@
// Copy the sub screen VRAM from the top screen - they should always be
// the same.
u16* buffer = get8BitBackBuffer();
-
- for (int r = 0; r < (512 * 256) >> 1; r++) {
- BG_GFX_SUB[r] = buffer[r];
- }
-
+
+ if(isCpuScalerEnabled())
+ {
+ for (int y = 0; y < gameHeight; ++y)
+ for (int x = 0; x < gameWidth / 2; ++x)
+ BG_GFX_SUB[y*256 + x] = buffer[y*gameWidth/2 + x];
+ }
+ else
+ {
+ for (int r = 0; r < (512 * 256) >> 1; r++) {
+ BG_GFX_SUB[r] = buffer[r];
+ }
+ }
SUB_DISPLAY_CR &= ~DISPLAY_BG1_ACTIVE; // Turn off keyboard layer
SUB_DISPLAY_CR |= DISPLAY_BG3_ACTIVE; // Turn on game layer
} else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list