Fixing Redbook hooks: Initialize last_check_time in RBACheckFinishedHook(); Execute RBACheckFinishedHook() during EVENT_WINDOW_DRAW in standard_handler() as EVENT_IDLE rarely happens if you have a shivering Joystick connected for example

This commit is contained in:
zicodxx 2011-07-16 16:02:20 +02:00
parent 5c660b3a2d
commit c8b7f65809
3 changed files with 4 additions and 2 deletions

View file

@ -2,7 +2,8 @@ D1X-Rebirth Changelog
20110716 20110716
-------- --------
main/songs.c: Correctly proceed to new Redbook track if songnum != Song_playing (hopefully - to confirm); Using songs_stop_all() in songs_uninit() to clear redundancy; added some notes to functions to shine a bit light on the mess of some functions main/songs.c: Correctly proceed to new Redbook track if songnum != Song_playing (hopefully - to confirm); Using songs_stop_all() in songs_uninit() to clear redundancy; added some notes to functions to shine a bit light on the mess of some functions; Also if there's no escape song, continue level music
arch/sdl/rbaudio.c, main/inferno.c: Fixing Redbook hooks: Initialize last_check_time in RBACheckFinishedHook(); Execute RBACheckFinishedHook() during EVENT_WINDOW_DRAW in standard_handler() as EVENT_IDLE rarely happens if you have a shivering Joystick connected for example
20110715 20110715
-------- --------

View file

@ -200,7 +200,7 @@ int RBAGetNumberOfTracks()
// a real hook would be ideal, but is currently unsupported by SDL Audio CD // a real hook would be ideal, but is currently unsupported by SDL Audio CD
void RBACheckFinishedHook() void RBACheckFinishedHook()
{ {
static fix64 last_check_time; static fix64 last_check_time = 0;
if (!s_cd) return; if (!s_cd) return;

View file

@ -261,6 +261,7 @@ int standard_handler(d_event *event)
} }
break; break;
case EVENT_WINDOW_DRAW:
case EVENT_IDLE: case EVENT_IDLE:
//see if redbook song needs to be restarted //see if redbook song needs to be restarted
RBACheckFinishedHook(); RBACheckFinishedHook();