Read about our upcoming Code of Conduct on this issue

Commit b36fb26f authored by alex@thinkpad's avatar alex@thinkpad
Browse files

crop_rec: fix off-by-one error when reading FPS timer B

(minor, no obvious side effects noticed)

--HG--
branch : crop_rec_4k
parent 5ec333c896ff
......@@ -662,7 +662,7 @@ static int adjust_shutter_blanking(int old)
});
/* what value is actually used for timer B? (possibly after our overrides) */
int fps_timer_b = shamem_read(0xC0F06014) & 0xFFFF;
int fps_timer_b = (shamem_read(0xC0F06014) & 0xFFFF) + 1;
dbg_printf("Timer B %d->%d\n", fps_timer_b_orig, fps_timer_b);
......@@ -813,7 +813,7 @@ static void FAST adtg_hook(uint32_t* regs, uint32_t* stack, uint32_t pc)
case CROP_PRESET_40_FPS:
{
/* assuming FPS timer B was overridden before this */
int fps_timer_b = shamem_read(0xC0F06014) & 0xFFFF;
int fps_timer_b = (shamem_read(0xC0F06014) & 0xFFFF) + 1;
int readout_end = shamem_read(0xC0F06804) >> 16; /* fixme: D5 only */
/* PowerSaveTiming registers */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment