projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.27.tar.gz
[xscreensaver]
/
hacks
/
apple2-main.c
diff --git
a/hacks/apple2-main.c
b/hacks/apple2-main.c
index 0e1508ff1ad514e1a0ca064ab9f58df78634df81..060e9b800ea884b1aa5fb20a6d2c6b75d556a46b 100644
(file)
--- a/
hacks/apple2-main.c
+++ b/
hacks/apple2-main.c
@@
-1,4
+1,4
@@
-/* xscreensaver, Copyright (c) 1998-201
2
Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1998-201
3
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
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@
-762,7
+762,21
@@
static void slideshow_controller(apple2_sim_t *sim, int *stepno,
*stepno=10;
break;
*stepno=10;
break;
+ case 80:
+ /* Do nothing, just wait */
+ *next_actiontime += 2.0;
+ *stepno = A2CONTROLLER_FREE;
+ break;
+
case A2CONTROLLER_FREE:
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);
free(mine->render_img);
free(mine->img_filename);
free(mine);
@@
-1770,7
+1784,11
@@
apple2_draw (Display *dpy, Window window, void *closure)
st->sim = 0;
}
st->sim = 0;
}
- return 10000;
+#ifdef USE_IPHONE
+ return 0;
+#else
+ return 5000;
+#endif
}
static void
}
static void
@@
-1778,7
+1796,8
@@
apple2_reshape (Display *dpy, Window window, void *closure,
unsigned int w, unsigned int h)
{
struct state *st = (struct state *) closure;
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
}
static Bool
@@
-1786,7
+1805,8
@@
apple2_event (Display *dpy, Window window, void *closure, XEvent *event)
{
struct state *st = (struct state *) closure;
{
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;
event->xany.type == KeyPress) {
terminal_keypress_handler (dpy, event, st->sim->controller_data);
return True;