From 4b884e9e3bff9f777f705d364627ce49ff4cedd6 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 4 Feb 2008 17:38:30 +1100 Subject: [PATCH] Add post-calibration delay, and fix cross-line bug that Anthony Towns and Val Henson found. --- prpong.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/prpong.c b/prpong.c index da584f9..660fc8a 100644 --- a/prpong.c +++ b/prpong.c @@ -716,6 +716,8 @@ static void calibrate(SDL_Surface *screen, SDL_UpdateRect(screen, 0, 0, 0, 0); SDL_FreeSurface(img); + SDL_Delay(500); + /* Must see it for a full half second. */ while (count < 20) { SDL_Event event; @@ -1283,7 +1285,7 @@ int main(int argc, char *argv[]) if (!same_side(&ball, state.ir_src[i].pos[0])) continue; if (!ir->valid || state.ir_src[i].size > ir->size) - ir = &state.ir_src[0]; + ir = &state.ir_src[i]; } if (ir->valid) { -- 2.39.5