mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-23 04:52:07 +00:00
Merge pull request #921 from BjossiAlfreds/ogg
Fixed ignoretrack0 and ogg menu option bugs
This commit is contained in:
commit
caab3864c6
2 changed files with 6 additions and 19 deletions
|
@ -2113,23 +2113,6 @@ static void
|
||||||
OGGShuffleFunc(void *unused)
|
OGGShuffleFunc(void *unused)
|
||||||
{
|
{
|
||||||
Cvar_SetValue("ogg_shuffle", s_options_oggshuffle_box.curvalue);
|
Cvar_SetValue("ogg_shuffle", s_options_oggshuffle_box.curvalue);
|
||||||
|
|
||||||
cvar_t *ogg_enable= Cvar_Get("ogg_enable", "1", CVAR_ARCHIVE);
|
|
||||||
int track = (int)strtol(cl.configstrings[CS_CDTRACK], (char **)NULL, 10);
|
|
||||||
|
|
||||||
if (s_options_oggshuffle_box.curvalue)
|
|
||||||
{
|
|
||||||
Cvar_Set("ogg_shuffle", "1");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Cvar_Set("ogg_shuffle", "0");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ogg_enable->value)
|
|
||||||
{
|
|
||||||
OGG_PlayTrack(track);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2143,9 +2126,12 @@ EnableOGGMusic(void *unused)
|
||||||
OGG_InitTrackList();
|
OGG_InitTrackList();
|
||||||
OGG_Stop();
|
OGG_Stop();
|
||||||
|
|
||||||
|
if (cls.state == ca_active)
|
||||||
|
{
|
||||||
int track = (int)strtol(cl.configstrings[CS_CDTRACK], (char **)NULL, 10);
|
int track = (int)strtol(cl.configstrings[CS_CDTRACK], (char **)NULL, 10);
|
||||||
OGG_PlayTrack(track);
|
OGG_PlayTrack(track);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OGG_Shutdown();
|
OGG_Shutdown();
|
||||||
|
|
|
@ -349,6 +349,7 @@ OGG_PlayTrack(int trackNo)
|
||||||
if(ogg_ignoretrack0->value == 0)
|
if(ogg_ignoretrack0->value == 0)
|
||||||
{
|
{
|
||||||
OGG_Stop();
|
OGG_Stop();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Special case: If ogg_ignoretrack0 is 0 we stopped the music (see above)
|
// Special case: If ogg_ignoretrack0 is 0 we stopped the music (see above)
|
||||||
|
|
Loading…
Reference in a new issue