Ignore loop count 0 in foobar/winamp

This commit is contained in:
bnnm 2021-08-27 22:20:44 +02:00
parent d1b71f705f
commit c8b2a63920
2 changed files with 12 additions and 0 deletions

View File

@ -40,6 +40,10 @@ void input_vgmstream::load_settings() {
override_title = cfg_OverrideTitle;
//exts_unknown_on = cfg_ExtsUnknownOn;
//exts_common_on = cfg_ExtsCommonOn;
/* exact 0 was allowed before (AKA "intro only") but confuses people and may result in unplayable files */
if (loop_count <= 0)
loop_count = 1;
}
void input_vgmstream::g_load_cfg(int *accept_unknown, int *accept_common) {
//todo improve

View File

@ -169,6 +169,10 @@ static void ini_set_b(const char *inifile, const char *entry, int val) {
if (settings->loop_forever && settings->ignore_loop)
settings->ignore_loop = 0;
/* exact 0 was allowed before (AKA "intro only") but confuses people and may result in unplayable files */
if (settings->loop_count <= 0)
settings->loop_count = 1;
}
static void save_config(In_Module* input_module, winamp_settings_t* settings) {
@ -277,6 +281,10 @@ static int dlg_load_form(HWND hDlg, winamp_settings_t* settings) {
dlg_combo_get(hDlg, IDC_GAIN_TYPE, (int*)&settings->gain_type);
dlg_combo_get(hDlg, IDC_CLIP_TYPE, (int*)&settings->clip_type);
/* exact 0 was allowed before (AKA "intro only") but confuses people and may result in unplayable files */
if (settings->loop_count <= 0)
settings->loop_count = 1;
return err ? 0 : 1;
}