mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
Add menu entries for selecting the timidity config
This commit is contained in:
parent
49df5a7f16
commit
1b1f8d605f
3 changed files with 16 additions and 0 deletions
|
@ -1386,6 +1386,7 @@ static void InitMusicMenus()
|
||||||
DMenuDescriptor **gusmenu = MenuDescriptors.CheckKey("GusConfigMenu");
|
DMenuDescriptor **gusmenu = MenuDescriptors.CheckKey("GusConfigMenu");
|
||||||
DMenuDescriptor **timiditymenu = MenuDescriptors.CheckKey("TimidityExeMenu");
|
DMenuDescriptor **timiditymenu = MenuDescriptors.CheckKey("TimidityExeMenu");
|
||||||
DMenuDescriptor **wildmidimenu = MenuDescriptors.CheckKey("WildMidiConfigMenu");
|
DMenuDescriptor **wildmidimenu = MenuDescriptors.CheckKey("WildMidiConfigMenu");
|
||||||
|
DMenuDescriptor **timiditycfgmenu = MenuDescriptors.CheckKey("TimidityConfigMenu");
|
||||||
DMenuDescriptor **fluidmenu = MenuDescriptors.CheckKey("FluidPatchsetMenu");
|
DMenuDescriptor **fluidmenu = MenuDescriptors.CheckKey("FluidPatchsetMenu");
|
||||||
|
|
||||||
const char *key, *value;
|
const char *key, *value;
|
||||||
|
@ -1426,6 +1427,11 @@ static void InitMusicMenus()
|
||||||
auto it = CreateOptionMenuItemCommand(key, FStringf("wildmidi_config %s", NicePath(value).GetChars()), true);
|
auto it = CreateOptionMenuItemCommand(key, FStringf("wildmidi_config %s", NicePath(value).GetChars()), true);
|
||||||
static_cast<DOptionMenuDescriptor*>(*wildmidimenu)->mItems.Push(it);
|
static_cast<DOptionMenuDescriptor*>(*wildmidimenu)->mItems.Push(it);
|
||||||
}
|
}
|
||||||
|
if (timiditycfgmenu != nullptr)
|
||||||
|
{
|
||||||
|
auto it = CreateOptionMenuItemCommand(key, FStringf("timidity_config \"%s\"", NicePath(value).GetChars()), true);
|
||||||
|
static_cast<DOptionMenuDescriptor*>(*timiditycfgmenu)->mItems.Push(it);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1437,6 +1443,8 @@ static void InitMusicMenus()
|
||||||
if (it != nullptr) d->mItems.Delete(d->mItems.Find(it));
|
if (it != nullptr) d->mItems.Delete(d->mItems.Find(it));
|
||||||
it = d->GetItem("WildMidiConfigMenu");
|
it = d->GetItem("WildMidiConfigMenu");
|
||||||
if (it != nullptr) d->mItems.Delete(d->mItems.Find(it));
|
if (it != nullptr) d->mItems.Delete(d->mItems.Find(it));
|
||||||
|
it = d->GetItem("TimidityConfigMenu");
|
||||||
|
if (it != nullptr) d->mItems.Delete(d->mItems.Find(it));
|
||||||
}
|
}
|
||||||
#ifdef _WIN32 // Different Timidity paths only make sense if they can be stored in arbitrary paths with local configs (i.e. not if things are done the Linux way)
|
#ifdef _WIN32 // Different Timidity paths only make sense if they can be stored in arbitrary paths with local configs (i.e. not if things are done the Linux way)
|
||||||
if (GameConfig->SetSection("TimidityExes"))
|
if (GameConfig->SetSection("TimidityExes"))
|
||||||
|
|
|
@ -2163,6 +2163,7 @@ ADVSNDMNU_REVERB = "Reverb";
|
||||||
ADVSNDMNU_FLUIDVOICES = "MIDI voices";
|
ADVSNDMNU_FLUIDVOICES = "MIDI voices";
|
||||||
ADVSNDMNU_TIMIDITY = "Timidity++";
|
ADVSNDMNU_TIMIDITY = "Timidity++";
|
||||||
ADVSNDMNU_TIMIDITYEXE = "Path for executable";
|
ADVSNDMNU_TIMIDITYEXE = "Path for executable";
|
||||||
|
ADVSNDMNU_TIMIDITYCONFIG = "Timidity config file";
|
||||||
ADVSNDMNU_TIMIDITYCHORUS = "Chorus";
|
ADVSNDMNU_TIMIDITYCHORUS = "Chorus";
|
||||||
ADVSNDMNU_TIMIDITYVOLUME = "Relative volume";
|
ADVSNDMNU_TIMIDITYVOLUME = "Relative volume";
|
||||||
ADVSNDMNU_WILDMIDI = "WildMidi";
|
ADVSNDMNU_WILDMIDI = "WildMidi";
|
||||||
|
|
|
@ -1680,6 +1680,8 @@ OptionMenu AdvSoundOptions protected
|
||||||
{
|
{
|
||||||
SubMenu "$ADVSNDMNU_SELCONFIG", "TimidityExeMenu"
|
SubMenu "$ADVSNDMNU_SELCONFIG", "TimidityExeMenu"
|
||||||
}
|
}
|
||||||
|
TextField "$ADVSNDMNU_TIMIDITYCONFIG", "timidity_config"
|
||||||
|
SubMenu "$ADVSNDMNU_SELCONFIG", "TimidityConfigMenu"
|
||||||
Option "$ADVSNDMNU_REVERB", "timidity_reverb", "OnOff"
|
Option "$ADVSNDMNU_REVERB", "timidity_reverb", "OnOff"
|
||||||
Option "$ADVSNDMNU_TIMIDITYCHORUS", "timidity_chorus", "OnOff"
|
Option "$ADVSNDMNU_TIMIDITYCHORUS", "timidity_chorus", "OnOff"
|
||||||
Slider "$ADVSNDMNU_TIMIDITYVOLUME", "timidity_mastervolume", 0, 4, 0.2, 1
|
Slider "$ADVSNDMNU_TIMIDITYVOLUME", "timidity_mastervolume", 0, 4, 0.2, 1
|
||||||
|
@ -1705,6 +1707,11 @@ OptionMenu TimidityExeMenu protected
|
||||||
Title "$ADVSNDMNU_SELCONFIG"
|
Title "$ADVSNDMNU_SELCONFIG"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OptionMenu TimidityConfigMenu protected
|
||||||
|
{
|
||||||
|
Title "$ADVSNDMNU_SELCONFIG"
|
||||||
|
}
|
||||||
|
|
||||||
OptionMenu FluidPatchsetMenu protected
|
OptionMenu FluidPatchsetMenu protected
|
||||||
{
|
{
|
||||||
Title "$ADVSNDMNU_SELCONFIG"
|
Title "$ADVSNDMNU_SELCONFIG"
|
||||||
|
|
Loading…
Reference in a new issue