1
0
Fork 0
forked from len0rd/rockbox

plugins: mikmod and chessbox weren't fully translated

This unfortunately required adding four more strings.

Change-Id: I656c3c4902de5f841ea742549b3d122463e399a8
This commit is contained in:
Solomon Peachy 2024-06-07 17:44:01 -04:00
parent 92b5255106
commit 20f50bbca3
3 changed files with 92 additions and 26 deletions

View file

@ -236,7 +236,7 @@ static int change_filename(int direct)
if (entries == 0)
{
rb->splash(HZ, "No supported files");
rb->splash(HZ, ID2P(LANG_NO_FILES));
return PLUGIN_ERROR;
}
@ -491,20 +491,6 @@ static struct mikmod_settings settings =
static struct mikmod_settings old_settings;
static const struct configdata config[] =
{
{ TYPE_INT, 0, 128, { .int_p = &settings.pansep }, "Panning Separation", NULL},
{ TYPE_INT, 0, 15, { .int_p = &settings.reverb }, "Reverberation", NULL},
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.interp }, "Interpolation", NULL},
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.reverse }, "Reverse Channels", NULL},
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.surround }, "Surround", NULL},
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.hqmixer }, "HQ Mixer", NULL},
{ TYPE_INT, 0, HW_NUM_FREQ-1, { .int_p = &settings.sample_rate }, "Sample Rate", NULL},
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.boost }, "CPU Boost", NULL},
#endif
};
static void applysettings(void)
{
md_pansep = settings.pansep;
@ -570,7 +556,7 @@ static int settings_menu(void)
{
int selection = 0;
MENUITEM_STRINGLIST(settings_menu, "Mikmod Settings", NULL,
MENUITEM_STRINGLIST(settings_menu, ID2P(LANG_MIKMOD_SETTINGS), NULL,
ID2P(LANG_PANNING_SEPARATION),
ID2P(LANG_REVERBERATION),
ID2P(LANG_INTERPOLATION),
@ -582,7 +568,6 @@ static int settings_menu(void)
ID2P(LANG_CPU_BOOST)
#endif
);
do
{
selection=rb->do_menu(&settings_menu,&selection, NULL, false);
@ -650,7 +635,7 @@ static int main_menu(void)
int selection = 0;
int result;
MENUITEM_STRINGLIST(main_menu,"Mikmod Main Menu",NULL,
MENUITEM_STRINGLIST(main_menu,ID2P(LANG_MIKMOD_MENU), NULL,
ID2P(LANG_SETTINGS),
ID2P(LANG_RETURN),
ID2P(LANG_MENU_QUIT));
@ -704,7 +689,12 @@ static void thread(void)
static void mm_errorhandler(void)
{
rb->splashf(HZ, "%s", MikMod_strerror(MikMod_errno));
if (rb->global_settings->talk_menu) {
rb->talk_id(LANG_ERROR_FORMATSTR, true);
rb->talk_value_decimal(MikMod_errno, UNIT_INT, 0, true);
rb->talk_force_enqueue_next();
}
rb->splashf(HZ, rb->str(LANG_ERROR_FORMATSTR), MikMod_strerror(MikMod_errno));
quit = true;
}
@ -717,13 +707,18 @@ static int playfile(char* filename)
playingtime = 0;
rb->splashf(HZ, "Loading %s", filename);
if (rb->global_settings->talk_menu) {
rb->talk_id(LANG_WAIT, true);
rb->talk_file_or_spell(NULL, filename, NULL, true);
rb->talk_force_enqueue_next();
}
rb->splashf(HZ, "%s %s", rb->str(LANG_WAIT), filename);
module = Player_Load(filename, 64, 0);
if (!module)
{
rb->splashf(HZ, "%s", MikMod_strerror(MikMod_errno));
mm_errorhandler();
retval = PLUGIN_ERROR;
quit = true;
}
@ -745,7 +740,7 @@ static int playfile(char* filename)
IF_PRIO(, PRIORITY_PLAYBACK)
IF_COP(, CPU))) == 0)
{
rb->splash(HZ, "Cannot create thread!");
rb->splashf(HZ, ID2P(LANG_ERROR_FORMATSTR), "Cannot create thread!");
return PLUGIN_ERROR;
}
#endif
@ -925,9 +920,23 @@ enum plugin_status plugin_start(const void* parameter)
enum plugin_status retval;
int orig_samplerate = rb->mixer_get_frequency();
const struct configdata config[] =
{
{ TYPE_INT, 0, 128, { .int_p = &settings.pansep }, rb->str(LANG_PANNING_SEPARATION), NULL},
{ TYPE_INT, 0, 15, { .int_p = &settings.reverb }, rb->str(LANG_REVERBERATION), NULL},
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.interp }, rb->str(LANG_INTERPOLATION), NULL},
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.reverse }, rb->str(LANG_SWAP_CHANNELS), NULL},
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.surround }, rb->str(LANG_MIKMOD_SURROUND), NULL},
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.hqmixer }, rb->str(LANG_MIKMOD_HQMIXER), NULL},
{ TYPE_INT, 0, HW_NUM_FREQ-1, { .int_p = &settings.sample_rate }, rb->str(LANG_MIKMOD_SAMPLERATE), NULL},
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.boost }, rb->str(LANG_CPU_BOOST), NULL},
#endif
};
if (parameter == NULL)
{
rb->splash(HZ*2, " Play .mod, .it, .s3m, .xm file ");
rb->splash(HZ*2, ID2P(LANG_NO_FILES));
return PLUGIN_OK;
}
@ -978,7 +987,7 @@ enum plugin_status plugin_start(const void* parameter)
if (MikMod_Init(""))
{
rb->splashf(HZ, "%s", MikMod_strerror(MikMod_errno));
mm_errorhandler();
return PLUGIN_ERROR;
}