mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-21 20:21:09 +00:00
Merge remote-tracking branch 'yquake2/master'
This commit is contained in:
commit
f040b01e00
5 changed files with 39 additions and 11 deletions
|
@ -302,6 +302,15 @@ it's `+set busywait 0` (setting the `busywait` cvar) and `-portable`
|
|||
0. Setting this cvar to `1` disables this behavior, the music keeps
|
||||
playing.
|
||||
|
||||
* **ogg_shuffle**: Ogg/Vorbis playback mode. Supported modes are:
|
||||
`0`: Loop the current track (the default).
|
||||
`1`: Play the current track once, then stop.
|
||||
`2`: Play all available tracks in a linear sequence.
|
||||
`3`: Shuffle through the available tracks, never play the same track
|
||||
twice in a row.
|
||||
`4`: Shuffle through the available tracks, may play the same track
|
||||
multiple times in a row.
|
||||
|
||||
* **s_doppler**: If set to `1` doppler effects are enabled. This is only
|
||||
supported by the OpenAL sound backend.
|
||||
|
||||
|
|
|
@ -236,10 +236,17 @@ IN_TranslateSDLtoQ2Key(unsigned int keysym)
|
|||
case SDLK_BACKSPACE:
|
||||
key = K_BACKSPACE;
|
||||
break;
|
||||
case SDLK_LGUI:
|
||||
#ifdef __APPLE__
|
||||
case SDLK_RGUI:
|
||||
key = K_COMMAND; // Win key
|
||||
case SDLK_LGUI:
|
||||
key = K_COMMAND;
|
||||
break;
|
||||
#else
|
||||
case SDLK_RGUI:
|
||||
case SDLK_LGUI:
|
||||
key = K_SUPER;
|
||||
break;
|
||||
#endif
|
||||
case SDLK_CAPSLOCK:
|
||||
key = K_CAPSLOCK;
|
||||
break;
|
||||
|
@ -395,8 +402,6 @@ IN_TranslateSDLtoQ2Key(unsigned int keysym)
|
|||
key = K_KP_EQUALS;
|
||||
break;
|
||||
|
||||
// TODO: K_SUPER ? Win Key is already K_COMMAND
|
||||
|
||||
case SDLK_APPLICATION:
|
||||
key = K_COMPOSE;
|
||||
break;
|
||||
|
|
|
@ -226,10 +226,17 @@ IN_TranslateSDLtoQ2Key(unsigned int keysym)
|
|||
case SDLK_BACKSPACE:
|
||||
key = K_BACKSPACE;
|
||||
break;
|
||||
case SDLK_LGUI:
|
||||
#ifdef __APPLE__
|
||||
case SDLK_RGUI:
|
||||
key = K_COMMAND; // Win key
|
||||
case SDLK_LGUI:
|
||||
key = K_COMMAND;
|
||||
break;
|
||||
#else
|
||||
case SDLK_RGUI:
|
||||
case SDLK_LGUI:
|
||||
key = K_SUPER;
|
||||
break;
|
||||
#endif
|
||||
case SDLK_CAPSLOCK:
|
||||
key = K_CAPSLOCK;
|
||||
break;
|
||||
|
@ -385,8 +392,6 @@ IN_TranslateSDLtoQ2Key(unsigned int keysym)
|
|||
key = K_KP_EQUALS;
|
||||
break;
|
||||
|
||||
// TODO: K_SUPER ? Win Key is already K_COMMAND
|
||||
|
||||
case SDLK_APPLICATION:
|
||||
key = K_COMPOSE;
|
||||
break;
|
||||
|
|
|
@ -2376,6 +2376,7 @@ Options_MenuInit(void)
|
|||
"play once",
|
||||
"sequential",
|
||||
"random",
|
||||
"truly random",
|
||||
0
|
||||
};
|
||||
|
||||
|
|
|
@ -530,6 +530,7 @@ OGG_PlayTrack(const char *track, qboolean cdtrack, qboolean immediate)
|
|||
newtrack = (curtrack + 1) % (ogg_maxfileindex + 1) != 0 ? (curtrack + 1) : 2;
|
||||
} break;
|
||||
case 3: // random
|
||||
case 4: // random with true randomness
|
||||
{
|
||||
int retries = 100;
|
||||
newtrack = 0;
|
||||
|
@ -537,6 +538,14 @@ OGG_PlayTrack(const char *track, qboolean cdtrack, qboolean immediate)
|
|||
while (retries-- > 0 && newtrack < 2)
|
||||
{
|
||||
newtrack = randk() % (ogg_maxfileindex + 1);
|
||||
|
||||
if (playback == 3)
|
||||
{
|
||||
if (newtrack == curtrack)
|
||||
{
|
||||
newtrack = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
} break;
|
||||
}
|
||||
|
@ -774,10 +783,9 @@ OGG_Cmd(void)
|
|||
void
|
||||
OGG_SaveState(void)
|
||||
{
|
||||
if (ogg_status != PLAY)
|
||||
if (ogg_enabled->value != 1 || ogg_status != PLAY)
|
||||
{
|
||||
ogg_saved_state.saved = false;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -792,7 +800,7 @@ OGG_SaveState(void)
|
|||
void
|
||||
OGG_RecoverState(void)
|
||||
{
|
||||
if (!ogg_saved_state.saved)
|
||||
if (ogg_enabled->value != 1 || ogg_saved_state.saved != true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue