From 142d47ef9d4443c1da95ae5a6367f0fb34c301f5 Mon Sep 17 00:00:00 2001 From: Bertrand Augereau Date: Sun, 9 Dec 2007 19:33:30 +0000 Subject: NDS : Improved scaler profiling svn-id: r29803 --- backends/platform/ds/arm9/source/dsmain.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'backends') 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