diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-06-07 17:44:01 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-06-07 17:47:17 -0400 |
commit | 20f50bbca360b5c772299cedaaa30c1a45456c2a (patch) | |
tree | 824d301b7db479340788685fae3e19edf5bb86fb /apps/plugins/mikmod | |
parent | 92b5255106c38a17f90862c22ff9ae76b6e7d916 (diff) | |
download | rockbox-20f50bbca360b5c772299cedaaa30c1a45456c2a.tar.gz rockbox-20f50bbca360b5c772299cedaaa30c1a45456c2a.zip |
plugins: mikmod and chessbox weren't fully translated
This unfortunately required adding four more strings.
Change-Id: I656c3c4902de5f841ea742549b3d122463e399a8
Diffstat (limited to 'apps/plugins/mikmod')
-rw-r--r-- | apps/plugins/mikmod/mikmod.c | 57 |
1 files changed, 33 insertions, 24 deletions
diff --git a/apps/plugins/mikmod/mikmod.c b/apps/plugins/mikmod/mikmod.c index 5179848549..089c338308 100644 --- a/apps/plugins/mikmod/mikmod.c +++ b/apps/plugins/mikmod/mikmod.c | |||
@@ -236,7 +236,7 @@ static int change_filename(int direct) | |||
236 | 236 | ||
237 | if (entries == 0) | 237 | if (entries == 0) |
238 | { | 238 | { |
239 | rb->splash(HZ, "No supported files"); | 239 | rb->splash(HZ, ID2P(LANG_NO_FILES)); |
240 | return PLUGIN_ERROR; | 240 | return PLUGIN_ERROR; |
241 | } | 241 | } |
242 | 242 | ||
@@ -491,20 +491,6 @@ static struct mikmod_settings settings = | |||
491 | 491 | ||
492 | static struct mikmod_settings old_settings; | 492 | static struct mikmod_settings old_settings; |
493 | 493 | ||
494 | static const struct configdata config[] = | ||
495 | { | ||
496 | { TYPE_INT, 0, 128, { .int_p = &settings.pansep }, "Panning Separation", NULL}, | ||
497 | { TYPE_INT, 0, 15, { .int_p = &settings.reverb }, "Reverberation", NULL}, | ||
498 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.interp }, "Interpolation", NULL}, | ||
499 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.reverse }, "Reverse Channels", NULL}, | ||
500 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.surround }, "Surround", NULL}, | ||
501 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.hqmixer }, "HQ Mixer", NULL}, | ||
502 | { TYPE_INT, 0, HW_NUM_FREQ-1, { .int_p = &settings.sample_rate }, "Sample Rate", NULL}, | ||
503 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | ||
504 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.boost }, "CPU Boost", NULL}, | ||
505 | #endif | ||
506 | }; | ||
507 | |||
508 | static void applysettings(void) | 494 | static void applysettings(void) |
509 | { | 495 | { |
510 | md_pansep = settings.pansep; | 496 | md_pansep = settings.pansep; |
@@ -570,7 +556,7 @@ static int settings_menu(void) | |||
570 | { | 556 | { |
571 | int selection = 0; | 557 | int selection = 0; |
572 | 558 | ||
573 | MENUITEM_STRINGLIST(settings_menu, "Mikmod Settings", NULL, | 559 | MENUITEM_STRINGLIST(settings_menu, ID2P(LANG_MIKMOD_SETTINGS), NULL, |
574 | ID2P(LANG_PANNING_SEPARATION), | 560 | ID2P(LANG_PANNING_SEPARATION), |
575 | ID2P(LANG_REVERBERATION), | 561 | ID2P(LANG_REVERBERATION), |
576 | ID2P(LANG_INTERPOLATION), | 562 | ID2P(LANG_INTERPOLATION), |
@@ -582,7 +568,6 @@ static int settings_menu(void) | |||
582 | ID2P(LANG_CPU_BOOST) | 568 | ID2P(LANG_CPU_BOOST) |
583 | #endif | 569 | #endif |
584 | ); | 570 | ); |
585 | |||
586 | do | 571 | do |
587 | { | 572 | { |
588 | selection=rb->do_menu(&settings_menu,&selection, NULL, false); | 573 | selection=rb->do_menu(&settings_menu,&selection, NULL, false); |
@@ -650,7 +635,7 @@ static int main_menu(void) | |||
650 | int selection = 0; | 635 | int selection = 0; |
651 | int result; | 636 | int result; |
652 | 637 | ||
653 | MENUITEM_STRINGLIST(main_menu,"Mikmod Main Menu",NULL, | 638 | MENUITEM_STRINGLIST(main_menu,ID2P(LANG_MIKMOD_MENU), NULL, |
654 | ID2P(LANG_SETTINGS), | 639 | ID2P(LANG_SETTINGS), |
655 | ID2P(LANG_RETURN), | 640 | ID2P(LANG_RETURN), |
656 | ID2P(LANG_MENU_QUIT)); | 641 | ID2P(LANG_MENU_QUIT)); |
@@ -704,7 +689,12 @@ static void thread(void) | |||
704 | 689 | ||
705 | static void mm_errorhandler(void) | 690 | static void mm_errorhandler(void) |
706 | { | 691 | { |
707 | rb->splashf(HZ, "%s", MikMod_strerror(MikMod_errno)); | 692 | if (rb->global_settings->talk_menu) { |
693 | rb->talk_id(LANG_ERROR_FORMATSTR, true); | ||
694 | rb->talk_value_decimal(MikMod_errno, UNIT_INT, 0, true); | ||
695 | rb->talk_force_enqueue_next(); | ||
696 | } | ||
697 | rb->splashf(HZ, rb->str(LANG_ERROR_FORMATSTR), MikMod_strerror(MikMod_errno)); | ||
708 | quit = true; | 698 | quit = true; |
709 | } | 699 | } |
710 | 700 | ||
@@ -717,13 +707,18 @@ static int playfile(char* filename) | |||
717 | 707 | ||
718 | playingtime = 0; | 708 | playingtime = 0; |
719 | 709 | ||
720 | rb->splashf(HZ, "Loading %s", filename); | 710 | if (rb->global_settings->talk_menu) { |
711 | rb->talk_id(LANG_WAIT, true); | ||
712 | rb->talk_file_or_spell(NULL, filename, NULL, true); | ||
713 | rb->talk_force_enqueue_next(); | ||
714 | } | ||
715 | rb->splashf(HZ, "%s %s", rb->str(LANG_WAIT), filename); | ||
721 | 716 | ||
722 | module = Player_Load(filename, 64, 0); | 717 | module = Player_Load(filename, 64, 0); |
723 | 718 | ||
724 | if (!module) | 719 | if (!module) |
725 | { | 720 | { |
726 | rb->splashf(HZ, "%s", MikMod_strerror(MikMod_errno)); | 721 | mm_errorhandler(); |
727 | retval = PLUGIN_ERROR; | 722 | retval = PLUGIN_ERROR; |
728 | quit = true; | 723 | quit = true; |
729 | } | 724 | } |
@@ -745,7 +740,7 @@ static int playfile(char* filename) | |||
745 | IF_PRIO(, PRIORITY_PLAYBACK) | 740 | IF_PRIO(, PRIORITY_PLAYBACK) |
746 | IF_COP(, CPU))) == 0) | 741 | IF_COP(, CPU))) == 0) |
747 | { | 742 | { |
748 | rb->splash(HZ, "Cannot create thread!"); | 743 | rb->splashf(HZ, ID2P(LANG_ERROR_FORMATSTR), "Cannot create thread!"); |
749 | return PLUGIN_ERROR; | 744 | return PLUGIN_ERROR; |
750 | } | 745 | } |
751 | #endif | 746 | #endif |
@@ -925,9 +920,23 @@ enum plugin_status plugin_start(const void* parameter) | |||
925 | enum plugin_status retval; | 920 | enum plugin_status retval; |
926 | int orig_samplerate = rb->mixer_get_frequency(); | 921 | int orig_samplerate = rb->mixer_get_frequency(); |
927 | 922 | ||
923 | const struct configdata config[] = | ||
924 | { | ||
925 | { TYPE_INT, 0, 128, { .int_p = &settings.pansep }, rb->str(LANG_PANNING_SEPARATION), NULL}, | ||
926 | { TYPE_INT, 0, 15, { .int_p = &settings.reverb }, rb->str(LANG_REVERBERATION), NULL}, | ||
927 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.interp }, rb->str(LANG_INTERPOLATION), NULL}, | ||
928 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.reverse }, rb->str(LANG_SWAP_CHANNELS), NULL}, | ||
929 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.surround }, rb->str(LANG_MIKMOD_SURROUND), NULL}, | ||
930 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.hqmixer }, rb->str(LANG_MIKMOD_HQMIXER), NULL}, | ||
931 | { TYPE_INT, 0, HW_NUM_FREQ-1, { .int_p = &settings.sample_rate }, rb->str(LANG_MIKMOD_SAMPLERATE), NULL}, | ||
932 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | ||
933 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.boost }, rb->str(LANG_CPU_BOOST), NULL}, | ||
934 | #endif | ||
935 | }; | ||
936 | |||
928 | if (parameter == NULL) | 937 | if (parameter == NULL) |
929 | { | 938 | { |
930 | rb->splash(HZ*2, " Play .mod, .it, .s3m, .xm file "); | 939 | rb->splash(HZ*2, ID2P(LANG_NO_FILES)); |
931 | return PLUGIN_OK; | 940 | return PLUGIN_OK; |
932 | } | 941 | } |
933 | 942 | ||
@@ -978,7 +987,7 @@ enum plugin_status plugin_start(const void* parameter) | |||
978 | 987 | ||
979 | if (MikMod_Init("")) | 988 | if (MikMod_Init("")) |
980 | { | 989 | { |
981 | rb->splashf(HZ, "%s", MikMod_strerror(MikMod_errno)); | 990 | mm_errorhandler(); |
982 | return PLUGIN_ERROR; | 991 | return PLUGIN_ERROR; |
983 | } | 992 | } |
984 | 993 | ||