mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-31 04:13:47 +01:00
Add force subsong title in Winamp
This commit is contained in:
parent
de850d4259
commit
7c8b823504
@ -71,6 +71,7 @@ typedef struct {
|
||||
int disable_subsongs;
|
||||
int downmix_channels;
|
||||
int tagfile_disable;
|
||||
int force_title;
|
||||
int exts_unknown_on;
|
||||
int exts_common_on;
|
||||
|
||||
@ -398,6 +399,7 @@ static void cfg_char_to_wchar(TCHAR *wdst, size_t wdstsize, const char *src) {
|
||||
#define INI_DISABLE_SUBSONGS TEXT("disable_subsongs")
|
||||
#define INI_DOWNMIX_CHANNELS TEXT("downmix_channels")
|
||||
#define INI_TAGFILE_DISABLE TEXT("tagfile_disable")
|
||||
#define INI_FORCE_TITLE TEXT("force_title")
|
||||
#define INI_EXTS_UNKNOWN_ON TEXT("exts_unknown_on")
|
||||
#define INI_EXTS_COMMON_ON TEXT("exts_common_on")
|
||||
#define INI_GAIN_TYPE TEXT("gain_type")
|
||||
@ -503,6 +505,7 @@ static void load_defaults(winamp_settings_t *defaults) {
|
||||
defaults->disable_subsongs = 0;
|
||||
defaults->downmix_channels = 0;
|
||||
defaults->tagfile_disable = 0;
|
||||
defaults->force_title = 0;
|
||||
defaults->exts_unknown_on = 0;
|
||||
defaults->exts_common_on = 0;
|
||||
defaults->gain_type = 1;
|
||||
@ -526,6 +529,7 @@ static void load_config(winamp_settings_t *settings, winamp_settings_t *defaults
|
||||
ini_get_b(inifile, INI_DISABLE_SUBSONGS, defaults->disable_subsongs, &settings->disable_subsongs);
|
||||
ini_get_i(inifile, INI_DOWNMIX_CHANNELS, defaults->downmix_channels, &settings->downmix_channels, 0, 64);
|
||||
ini_get_b(inifile, INI_TAGFILE_DISABLE, defaults->tagfile_disable, &settings->tagfile_disable);
|
||||
ini_get_b(inifile, INI_FORCE_TITLE, defaults->force_title, &settings->force_title);
|
||||
ini_get_b(inifile, INI_EXTS_UNKNOWN_ON, defaults->exts_unknown_on, &settings->exts_unknown_on);
|
||||
ini_get_b(inifile, INI_EXTS_COMMON_ON, defaults->exts_common_on, &settings->exts_common_on);
|
||||
|
||||
@ -553,6 +557,7 @@ static void save_config(winamp_settings_t *settings) {
|
||||
ini_set_b(inifile, INI_DISABLE_SUBSONGS, settings->disable_subsongs);
|
||||
ini_set_i(inifile, INI_DOWNMIX_CHANNELS, settings->downmix_channels);
|
||||
ini_set_b(inifile, INI_TAGFILE_DISABLE, settings->tagfile_disable);
|
||||
ini_set_b(inifile, INI_FORCE_TITLE, settings->force_title);
|
||||
ini_set_b(inifile, INI_EXTS_UNKNOWN_ON, settings->exts_unknown_on);
|
||||
ini_set_b(inifile, INI_EXTS_COMMON_ON, settings->exts_common_on);
|
||||
|
||||
@ -634,6 +639,7 @@ static int dlg_load_form(HWND hDlg, winamp_settings_t *settings) {
|
||||
dlg_check_get(hDlg, IDC_DISABLE_SUBSONGS, &settings->disable_subsongs);
|
||||
dlg_input_get_i(hDlg, IDC_DOWNMIX_CHANNELS, &settings->downmix_channels, TEXT("Downmix must be a positive integer number"), &err);
|
||||
dlg_check_get(hDlg, IDC_TAGFILE_DISABLE, &settings->tagfile_disable);
|
||||
dlg_check_get(hDlg, IDC_FORCE_TITLE, &settings->force_title);
|
||||
dlg_check_get(hDlg, IDC_EXTS_UNKNOWN_ON, &settings->exts_unknown_on);
|
||||
dlg_check_get(hDlg, IDC_EXTS_COMMON_ON, &settings->exts_common_on);
|
||||
|
||||
@ -657,6 +663,7 @@ static void dlg_save_form(HWND hDlg, winamp_settings_t *settings, int reset) {
|
||||
dlg_check_set(hDlg, IDC_DISABLE_SUBSONGS, settings->disable_subsongs);
|
||||
dlg_input_set_i(hDlg, IDC_DOWNMIX_CHANNELS, settings->downmix_channels);
|
||||
dlg_check_set(hDlg, IDC_TAGFILE_DISABLE, settings->tagfile_disable);
|
||||
dlg_check_set(hDlg, IDC_FORCE_TITLE, settings->force_title);
|
||||
dlg_check_set(hDlg, IDC_EXTS_UNKNOWN_ON, settings->exts_unknown_on);
|
||||
dlg_check_set(hDlg, IDC_EXTS_COMMON_ON, settings->exts_common_on);
|
||||
|
||||
@ -918,7 +925,7 @@ static void get_title(in_char * dst, int dst_size, const in_char * fn, VGMSTREAM
|
||||
}
|
||||
|
||||
/* show name if file has subsongs (implicitly shows also for TXTP) */
|
||||
if (info_name[0] != '\0' && ((info_streams > 0 && !is_first) || info_streams == 1)) {
|
||||
if (info_name[0] != '\0' && ((info_streams > 0 && !is_first) || info_streams == 1 || settings.force_title)) {
|
||||
in_char stream_name[PATH_LIMIT];
|
||||
wa_char_to_ichar(stream_name, PATH_LIMIT, info_name);
|
||||
wa_snprintf(buffer,PATH_LIMIT, wa_L(" (%s)"), stream_name);
|
||||
|
@ -15,3 +15,4 @@
|
||||
#define IDC_CLIP_TYPE 1014
|
||||
#define IDC_EXTS_UNKNOWN_ON 1015
|
||||
#define IDC_EXTS_COMMON_ON 1016
|
||||
#define IDC_FORCE_TITLE 1017
|
||||
|
@ -43,13 +43,13 @@ BEGIN
|
||||
|
||||
LTEXT "Downmix",IDC_STATIC,7,115,48,12
|
||||
EDITTEXT IDC_DOWNMIX_CHANNELS,52,112,37,14,ES_AUTOHSCROLL
|
||||
|
||||
|
||||
CONTROL "Disable tagfile",IDC_TAGFILE_DISABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,131,87,10
|
||||
|
||||
//CONTROL "Override title",IDC_OVERRIDE_TITLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,147,97,10
|
||||
|
||||
|
||||
CONTROL "Force internal title",IDC_FORCE_TITLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,147,87,10
|
||||
|
||||
CONTROL "Enable unknown exts",IDC_EXTS_UNKNOWN_ON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,163,87,10
|
||||
|
||||
|
||||
CONTROL "Enable common exts",IDC_EXTS_COMMON_ON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,179,87,10
|
||||
|
||||
|
||||
END
|
||||
|
Loading…
x
Reference in New Issue
Block a user