Fix merge errors

This commit is contained in:
mazmazz 2018-08-15 02:42:50 -04:00
parent 878ea36559
commit 0254f4f368
2 changed files with 4 additions and 22 deletions

View file

@ -2236,8 +2236,6 @@ static int lib_sChangeMusic(lua_State *L)
#endif
music_flags = (UINT16)luaL_optinteger(L, 4, 0);
fadein_ms = luaL_optinteger(L, 5, 0);
if (!player || P_IsLocalPlayer(player))
{
S_ChangeMusic(music_name, music_flags, looping);
@ -2314,12 +2312,6 @@ static int lib_sPauseMusic(lua_State *L)
static int lib_sResumeMusic(lua_State *L)
{
player_t *player = NULL;
NOHUD
if (!lua_isnone(L, 1) && lua_isuserdata(L, 1))
{
player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
UINT32 position = (UINT32)luaL_checkinteger(L, 1);
player_t *player = NULL;
NOHUD
if (!lua_isnone(L, 2) && lua_isuserdata(L, 2))
@ -2351,7 +2343,7 @@ static int lib_sStopMusic(lua_State *L)
if (!player || P_IsLocalPlayer(player))
{
S_StopMusic();
lua_pushboolean(L, true)
lua_pushboolean(L, true);
}
else
lua_pushnil(L);

View file

@ -457,7 +457,7 @@ static void music_loop(void)
else
{
Mix_UnregisterEffect(MIX_CHANNEL_POST, count_music_bytes);
music_bytes = 0;
music_bytes = 0;
// be consistent with FMOD, otherwise I'd prefer to freeze music_bytes
// since the other flags indicate music is still playing.
}
@ -508,7 +508,7 @@ void I_ResumeSong(INT32 handle)
(void)handle;
if(!midimode)
{
while(Mix_UnregisterEffect(MIX_CHANNEL_POST, count_music_bytes) != 0) { }
while(Mix_UnregisterEffect(MIX_CHANNEL_POST, count_music_bytes) != 0) { }
// HACK: fixes issue of multiple effect callbacks being registered
if(music && !Mix_RegisterEffect(MIX_CHANNEL_POST, count_music_bytes, NULL, NULL))
// midimode and music must be checked in case nothing is actually playing
@ -528,16 +528,6 @@ boolean I_MusicPlaying(void)
return (boolean)music;
}
boolean I_MIDIPlaying(void)
{
return midimode && music;
}
boolean I_MusicPlaying(void)
{
return (boolean)music;
}
boolean I_MusicPaused(void)
{
return Mix_PausedMusic();
@ -918,7 +908,7 @@ boolean I_PlaySong(INT32 handle, boolean looping)
is_looping = looping;
//MIDI does count correctly, but dummy out because unsupported
//If this is enabled, you need to edit Mix_PlayMusic above to never loop (0)
//If this is enabled, you need to edit Mix_PlayMusic above to never loop (0)
//and register the music_loop callback
//music_bytes = 0;
//if(!Mix_RegisterEffect(MIX_CHANNEL_POST, count_music_bytes, NULL, NULL))