- cleanup of sound system startup and menu handling:
* added global functions that check whether FMod and OpenAL are present, without initializing the sound backend. * make sound init code more fault tolerant. It will now try to switch between FMod and OpenAL if the currently active one cannot be found but the other one can. * added 'ifoption' checks for sound backend to menu code. * only show sound backends which are present and hide the options for the ones which are not.
This commit is contained in:
parent
8e70a9b894
commit
aecff68a4d
6 changed files with 188 additions and 30 deletions
|
|
@ -49,6 +49,7 @@
|
|||
#include "i_music.h"
|
||||
#include "m_joy.h"
|
||||
#include "gi.h"
|
||||
#include "i_sound.h"
|
||||
|
||||
#include "optionmenuitems.h"
|
||||
|
||||
|
|
@ -170,6 +171,14 @@ static bool CheckSkipOptionBlock(FScanner &sc)
|
|||
filter = true;
|
||||
#endif
|
||||
}
|
||||
else if (sc.Compare("OpenAL"))
|
||||
{
|
||||
filter |= IsOpenALPresent();
|
||||
}
|
||||
else if (sc.Compare("FModEx"))
|
||||
{
|
||||
filter |= IsFModExPresent();
|
||||
}
|
||||
}
|
||||
while (sc.CheckString(","));
|
||||
sc.MustGetStringName(")");
|
||||
|
|
@ -591,7 +600,11 @@ static void ParseOptionSettings(FScanner &sc)
|
|||
while (!sc.CheckString("}"))
|
||||
{
|
||||
sc.MustGetString();
|
||||
if (sc.Compare("ifgame"))
|
||||
if (sc.Compare("else"))
|
||||
{
|
||||
SkipSubBlock(sc);
|
||||
}
|
||||
else if (sc.Compare("ifgame"))
|
||||
{
|
||||
if (!CheckSkipGameBlock(sc))
|
||||
{
|
||||
|
|
@ -628,7 +641,11 @@ static void ParseOptionMenuBody(FScanner &sc, FOptionMenuDescriptor *desc)
|
|||
while (!sc.CheckString("}"))
|
||||
{
|
||||
sc.MustGetString();
|
||||
if (sc.Compare("ifgame"))
|
||||
if (sc.Compare("else"))
|
||||
{
|
||||
SkipSubBlock(sc);
|
||||
}
|
||||
else if (sc.Compare("ifgame"))
|
||||
{
|
||||
if (!CheckSkipGameBlock(sc))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue