From: Rusty Russell Date: Mon, 4 Feb 2008 06:38:30 +0000 (+1100) Subject: Add post-calibration delay, and fix cross-line bug that Anthony Towns and Val Henson... X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=4b884e9e3bff9f777f705d364627ce49ff4cedd6;p=ponghero.git Add post-calibration delay, and fix cross-line bug that Anthony Towns and Val Henson found. --- 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) {