-/* xscreensaver, Copyright (c) 1998-2012 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1998-2013 Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
*stepno=10;
break;
+ case 80:
+ /* Do nothing, just wait */
+ *next_actiontime += 2.0;
+ *stepno = A2CONTROLLER_FREE;
+ break;
+
case A2CONTROLLER_FREE:
+ /* It is possible that still image is being loaded,
+ in that case mine cannot be freed, because
+ callback function tries to use it, so wait.
+ */
+ if (mine->image_loading_p) {
+ *stepno = 80;
+ break;
+ }
free(mine->render_img);
free(mine->img_filename);
free(mine);
}
break;
case 10: /* LF */
+# ifndef HAVE_FORKPTY
+ state->cursor_x = 0; /* No ptys on iPhone; assume CRLF. */
+# endif
case 11: /* VT */
case 12: /* FF */
if (state->cursor_y < rows - 1)
st->sim = 0;
}
- return 10000;
+#ifdef USE_IPHONE
+ return 0;
+#else
+ return 5000;
+#endif
}
static void
unsigned int w, unsigned int h)
{
struct state *st = (struct state *) closure;
- analogtv_reconfigure (st->sim->dec);
+ if (st->sim)
+ analogtv_reconfigure (st->sim->dec);
}
static Bool
{
struct state *st = (struct state *) closure;
- if (st->controller == terminal_controller &&
+ if (st->sim &&
+ st->controller == terminal_controller &&
event->xany.type == KeyPress) {
terminal_keypress_handler (dpy, event, st->sim->controller_data);
return True;