Rockbox

Tasklist

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, 15:32 GMT
Last edited by Teruaki Kawashima (teru) - Thursday, 03 June 2010, 14:02 GMT
Task Type Patches
Category User Interface
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.4
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

in 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, 14:02 GMT
Reason for closing:  Accepted
Additional comments about closing:  Committed in r26510.
Comment by Teruaki Kawashima (teru) - Friday, 21 May 2010, 15:36 GMT
i uploaded wrong correct_reusing_backdrop.diff... this is the correct one.

Loading...