X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=pctb%2Fpages.c;h=ca2428d874d9a7b87ee0f3b231fc8f37bb7594c8;hb=8fc3ec638c7e516f4610775488f2e7f40689a68f;hp=32e429ab39df1be1220b2bedbe083a1be7ccf17d;hpb=0487d41d9c7796c6efebb8235c9aa39fe580ccf9;p=ypp-sc-tools.db-live.git diff --git a/pctb/pages.c b/pctb/pages.c index 32e429a..ca2428d 100644 --- a/pctb/pages.c +++ b/pctb/pages.c @@ -322,15 +322,13 @@ static void wait_for_stability(Snapshot **output, /* waits longer if we're going to return an image identical to previously * if previously==0, all images are considered identical to it */ - debugf("PAGING wait_for_stability" - " last_input=%f previously=%p\n", - last_input, previously); - - char *doing; - sysassert( vasprintf(&doing,fmt,al) >=0); - + char *doing= masprintf(fmt,al); progress("%s",doing); + debugf("PAGING wait_for_stability" + " last_input=%f previously=%p `%s'\n", + last_input, previously, doing); + for (;;) { double at_snapshot= timestamp(); double need_sleep= min_update_allowance - (at_snapshot - last_input); @@ -514,7 +512,7 @@ static void prepare_ypp_client(void) { raise_and_get_details(); wait_for_stability(¤t,0,0, "checking current YPP client screen..."); -#if 1 +#if 0 timestamp(); snapshot(¤t); snapshot(¤t); @@ -596,7 +594,7 @@ void take_one_screenshot(void) { prepare_ypp_client(); wait_for_stability(¤t,0,0, "taking screenshot..."); page0_rgbimage= alloc_rgb_image(current->w, current->h); - page_images[0]= convert_page(current, 0); + page_images[0]= convert_page(current, page0_rgbimage); npages= 1; progress_log("collected single screenshot."); }