X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fapple2-main.c;h=7691e151faefe9cbc0796da46c13aab805e1de00;hb=6afd6db0ae9396cd7ff897ade597cd5483f49b0e;hp=ef21995b2ce9cf85db2ab808f8a0aa9fff79cddf;hpb=4ade52359b6eba3621566dac79793a33aa4c915f;p=xscreensaver diff --git a/hacks/apple2-main.c b/hacks/apple2-main.c index ef21995b..7691e151 100644 --- a/hacks/apple2-main.c +++ b/hacks/apple2-main.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1998-2013 Jamie Zawinski +/* xscreensaver, Copyright (c) 1998-2014 Jamie Zawinski * * 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; + 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); @@ -1278,7 +1292,8 @@ terminal_controller(apple2_sim_t *sim, int *stepno, double *next_actiontime) mine->tc = textclient_open (mine->dpy); textclient_reshape (mine->tc, SCREEN_COLS, SCREEN_ROWS, - SCREEN_COLS, SCREEN_ROWS); + SCREEN_COLS, SCREEN_ROWS, + 0); } if (! mine->fast_p) @@ -1770,7 +1785,11 @@ apple2_draw (Display *dpy, Window window, void *closure) st->sim = 0; } - return 10000; +#ifdef USE_IPHONE + return 0; +#else + return 5000; +#endif } static void