mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
expo: Convert to using a string ID for the scene title
This is easier to deal with if it uses the existing string handling, since we will be able to use translations, etc. in the future. Update it to use an ID instead of a string. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
d2043b5682
commit
def898c458
3 changed files with 17 additions and 20 deletions
|
@ -65,16 +65,12 @@ void scene_destroy(struct scene *scn)
|
|||
scene_obj_destroy(obj);
|
||||
|
||||
free(scn->name);
|
||||
free(scn->title);
|
||||
free(scn);
|
||||
}
|
||||
|
||||
int scene_title_set(struct scene *scn, const char *title)
|
||||
int scene_title_set(struct scene *scn, uint id)
|
||||
{
|
||||
free(scn->title);
|
||||
scn->title = strdup(title);
|
||||
if (!scn->title)
|
||||
return log_msg_ret("tit", -ENOMEM);
|
||||
scn->title_id = id;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue