diff options
author | Bertrand Augereau | 2007-12-09 19:33:30 +0000 |
---|---|---|
committer | Bertrand Augereau | 2007-12-09 19:33:30 +0000 |
commit | 142d47ef9d4443c1da95ae5a6367f0fb34c301f5 (patch) | |
tree | 8e28b12c9376db1ae795ddd3238759e0f3115d66 /backends | |
parent | 805b05ec4cff39213156105132d4e0067128dea8 (diff) | |
download | scummvm-rg350-142d47ef9d4443c1da95ae5a6367f0fb34c301f5.tar.gz scummvm-rg350-142d47ef9d4443c1da95ae5a6367f0fb34c301f5.tar.bz2 scummvm-rg350-142d47ef9d4443c1da95ae5a6367f0fb34c301f5.zip |
NDS : Improved scaler profiling
svn-id: r29803
Diffstat (limited to 'backends')
-rw-r--r-- | backends/platform/ds/arm9/source/dsmain.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index 42d6451381..4d747604c6 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -817,12 +817,17 @@ void displayMode16BitFlipBuffer() { BG_PALETTE ); #ifdef SCALER_PROFILE + // 10 pixels : 1ms u16 t1 = TIMER1_DATA; TIMER1_CR &= ~TIMER_ENABLE; u32 dt = t1 - t0; u32 dt_us = (dt * 10240) / 334; - u32 dt_ms = dt_us / 1000; - memset(base, 0xFF, dt_ms*2); + u32 dt_10ms = dt_us / 100; + int i; + for(i=0; i<dt_10ms; ++i) + base[i] = ((i/10)&1) ? 0xFFFF : 0x801F; + for(; i<256; ++i) + base[i] = 0x8000; #endif } #ifdef HEAVY_LOGGING |