mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Block song position changes on GME because unstable
This commit is contained in:
parent
9c56f953a5
commit
e24ea0cb4d
1 changed files with 15 additions and 13 deletions
|
|
@ -774,23 +774,25 @@ boolean I_SetSongPosition(UINT32 position)
|
||||||
#ifdef HAVE_LIBGME
|
#ifdef HAVE_LIBGME
|
||||||
if (gme)
|
if (gme)
|
||||||
{
|
{
|
||||||
|
// this is unstable, so fail silently
|
||||||
|
return true;
|
||||||
// this isn't required technically, but GME thread-locks for a second
|
// this isn't required technically, but GME thread-locks for a second
|
||||||
// if you seek too high from the counter
|
// if you seek too high from the counter
|
||||||
length = I_GetSongLength();
|
// length = I_GetSongLength();
|
||||||
if (length)
|
// if (length)
|
||||||
position = get_adjusted_position(position);
|
// position = get_adjusted_position(position);
|
||||||
|
|
||||||
SDL_LockAudio();
|
// SDL_LockAudio();
|
||||||
gme_err_t gme_e = gme_seek(gme, position);
|
// gme_err_t gme_e = gme_seek(gme, position);
|
||||||
SDL_UnlockAudio();
|
// SDL_UnlockAudio();
|
||||||
|
|
||||||
if (gme_e != NULL)
|
// if (gme_e != NULL)
|
||||||
{
|
// {
|
||||||
CONS_Alert(CONS_ERROR, "GME error: %s\n", gme_e);
|
// CONS_Alert(CONS_ERROR, "GME error: %s\n", gme_e);
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
return true;
|
// return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue