Mercurial > MadButterfly
diff examples/menu/filebrowser.c @ 346:b391722bf20e
sh_image_t::img_data is managed by paint_image_t.
- sh_image_t should not try to free it.
- call sh_text_P_generate_layout() in sh_text_transform()
- remove calling from other functions.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sun, 08 Mar 2009 14:44:41 +0800 |
parents | d04085404583 |
children | b247beaac4f0 |
line wrap: on
line diff
--- a/examples/menu/filebrowser.c Sun Mar 08 11:47:14 2009 +0800 +++ b/examples/menu/filebrowser.c Sun Mar 08 14:44:41 2009 +0800 @@ -67,7 +67,9 @@ void mypreview(MyAppData *data, char *path) { - mb_img_data_t *img = MB_IMG_LDR_LOAD(rdman_img_ldr(MBAPP_RDMAN(myApp)), path); + redraw_man_t *rdman = MBAPP_RDMAN(myApp); + mb_img_ldr_t *ldr = rdman_img_ldr(rdman); + mb_img_data_t *img = MB_IMG_LDR_LOAD(ldr, path); shape_t *obj = (shape_t *) MB_SPRITE_GET_OBJ(myApp->rootsprite, "previewimg"); printf("Preview %s\n",path);