X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fapple2.c;h=7d481830f041cd26b4021c2fdb553a6c9e001215;hb=d1ae2829ff0fd2a96c16a0c8c5420efaa47d7b30;hp=d50fb015c833c85514026d54207f6bc485123689;hpb=5f9c47ca98dd43d8f59b7c27d3fde6edfde4fe21;p=xscreensaver diff --git a/hacks/apple2.c b/hacks/apple2.c index d50fb015..7d481830 100644 --- a/hacks/apple2.c +++ b/hacks/apple2.c @@ -20,8 +20,6 @@ #include "xshm.h" #endif -#define DEBUG - /* * Implementation notes * @@ -151,7 +149,7 @@ void a2_goto(apple2_state_t *st, int r, int c) { if (r > 23) r = 23; - if (c > 39) r = 39; + if (c > 39) c = 39; st->textlines[st->cursy][st->cursx] |= 0xc0; /* turn off blink */ st->cursy=r; st->cursx=c; @@ -700,6 +698,9 @@ apple2_one_frame (apple2_sim_t *sim) DONE: sim->stepno=A2CONTROLLER_FREE; sim->controller (sim, &sim->stepno, &sim->next_actiontime); + /* if stepno is changed, return 1 */ + if (sim->stepno != A2CONTROLLER_FREE) + return 1; XClearWindow(sim->dpy, sim->window); @@ -804,10 +805,11 @@ apple2_one_frame (apple2_sim_t *sim) } } } - analogtv_init_signal(sim->dec, 0.02); analogtv_reception_update(&sim->reception); - analogtv_add_signal(sim->dec, &sim->reception); - analogtv_draw(sim->dec); + { + const analogtv_reception *rec = &sim->reception; + analogtv_draw(sim->dec, 0.02, &rec, 1); + } return 1; }