Advertising
- Miscellany
- Sunday, December 9th, 2007 at 5:36:12pm MST
- Index: apps/plugins/pictureflow.c
- ===================================================================
- --- apps/plugins/pictureflow.c (révision 15900)
- +++ apps/plugins/pictureflow.c (copie de travail)
- @@ -533,10 +533,15 @@
- int ret;
- input_bmp.data = (char *) &input_bmp_buffer;
- ret = rb->read_bmp_file(tmp_path_name, &input_bmp, sizeof(input_bmp_buffer), FORMAT_NATIVE);
- - if (ret <= 0) continue; /* skip missing/broken files */
- + if (ret <= 0) {
- + rb->splash(HZ, "couldn't read bmp");
- + continue; /* skip missing/broken files */
- + }
- rb->snprintf(tmp_path_name, sizeof(tmp_path_name), CACHE_PREFIX "/%d.pfraw", i);
- - create_bmp(&input_bmp, tmp_path_name);
- + if (!create_bmp(&input_bmp, tmp_path_name)) {
- + rb->splash(HZ, "couldn't write bmp");
- + }
- if ( rb->button_get(false) == PICTUREFLOW_MENU ) return false;
- }
- int fh = rb->creat( CACHE_PREFIX "/ready" );
- @@ -720,13 +725,13 @@
- /**
- Safe the given bitmap as filename in the pfraw format
- */
- -int save_pfraw(char* filename, struct bitmap *bm)
- +bool save_pfraw(char* filename, struct bitmap *bm)
- {
- struct pfraw_header bmph;
- bmph.width = bm->width;
- bmph.height = bm->height;
- int fh = rb->creat( filename );
- - if( fh < 0 ) return -1;
- + if( fh < 0 ) return false;
- rb->write( fh, &bmph, sizeof( struct pfraw_header ) );
- int y;
- for( y = 0; y < bm->height; y++ )
- @@ -735,7 +740,7 @@
- rb->write( fh, d, sizeof( fb_data ) * bm->width );
- }
- rb->close( fh );
- - return 0;
- + return true;
- }
- @@ -815,8 +820,7 @@
- LCD_RGBPACK(r, g, b);
- }
- }
- - save_pfraw(target_path, &output_bmp);
- - return true;
- + return save_pfraw(target_path, &output_bmp);
- }
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.