From b3113674819cd8daf44750d129c5d8298e830df0 Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Sun, 5 Aug 2007 19:19:39 +0000 Subject: *** Lang v2 cleanup (FS#6574) *** 1) Introduces apps/features.txt that controls which strings are included for each target based on defines. 2) .lng and .voice files are now target specific and the format versions of both these file types have been bumped, which means that new voice files are needed. 3) Use the 'features' mechanism to exclude strings for targets that didn't use them. 4) Delete unused and deprecated and duplicated strings, sort strings in english.lang Some string IDs were changed so translations will be slightly worse than before. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14198 a1c6a512-1295-4272-9138-f99709370657 --- apps/talk.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apps/talk.c') diff --git a/apps/talk.c b/apps/talk.c index 1610fa95ec..89ab3901c4 100644 --- a/apps/talk.c +++ b/apps/talk.c @@ -95,6 +95,7 @@ struct clip_entry /* one entry of the index table */ struct voicefile /* file format of our voice file */ { int version; /* version of the voicefile */ + int target_id; /* the rockbox target the file was made for */ int table; /* offset to index table, (=header size) */ int id1_max; /* number of "normal" clips contained in above index */ int id2_max; /* number of "voice only" clips contained in above index */ @@ -197,6 +198,11 @@ static void load_voicefile(void) { p_voicefile = (struct voicefile*)audiobuf; + if (p_voicefile->target_id != TARGET_ID) + { + logf("Incompatible voice file (wrong target)"); + goto load_err; + } #if CONFIG_CODEC != SWCODEC /* MASCODEC: now use audiobuf for voice then thumbnail */ p_thumbnail = audiobuf + file_size; -- cgit v1.2.3