This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#11305 - Correct "reuse buffers if the backdrop file is already loaded"
Attached to Project:
Rockbox
Opened by Teruaki Kawashima (teru) - Friday, 21 May 2010, 17:32 GMT+2
Last edited by Teruaki Kawashima (teru) - Thursday, 03 June 2010, 16:02 GMT+2
Opened by Teruaki Kawashima (teru) - Friday, 21 May 2010, 17:32 GMT+2
Last edited by Teruaki Kawashima (teru) - Thursday, 03 June 2010, 16:02 GMT+2
|
Detailsin current svn, reusing buffer works only if both skins don't contais %X tag.
the cause is: if the skin contains %X tag, string passed to skin_backdrop_load as backdrop is somthing like "sbsback.bmp|\n%Vi|14|66|212|224|1|000000|ffffff|\n..." and will be stored to bdrop->name as "sbsback.bmp|\n%Vi|14|66|212|224|1|0000". so, comparing passed backdrop and bdrop->name will always fail. attached correct_reusing_backdrop.diff changes this like follows: change size of bdrop->name to MAX_PATH, use filename which is fullpath of the file for both comparing and stored value. improve_set_as_backdrop.diff improve "Set as backdrop" functionality. it fix that, after N times of failure of "Set As Backdrop" or "Clear Backdrop", "Set As Backdrop" always fails until reloading a skin becase of lack of memory. instead of allocating buffer by skin_buffer_alloc(), add new function skin_backdrop_getbuffer() and pass "-" as filename to get same buffer for the backdrop used in sb_set_backdrop(). |
This task depends upon
Closed by Teruaki Kawashima (teru)
Thursday, 03 June 2010, 16:02 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed in r26510.
Thursday, 03 June 2010, 16:02 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed in r26510.
i uploaded wrong correct_reusing_backdrop.diff... this is the correct one.