- printf("current video mode: %dx%d %dbpp\n", xsz, ysz, depth);
+ fbgfx_get_video_mode(&xsz, &ysz, &depth);
+ if(depth != 16) {
+ fprintf(stderr, "failed to set color depth: 16bpp\n");
+ goto end;
+ }
+ if(fbev_init() == -1) {
+ goto end;
+ }
+ fbev_keyboard(keyboard, 0);
+ fbev_mbutton(mouse, 0);
+ fbev_mmotion(motion, 0);
+
+ if(init_tunnel(xsz, ysz) == -1) {
+ goto end;
+ }
+
+ start_msec = get_time_msec();
+ for(;;) {
+ fbev_update();
+ if(quit) break;
+
+ time_msec = get_time_msec() - start_msec;