Rodolfo and Me fixed ProcessFifoWaitEvents() in CoreTiming, now process the all events and not only the first :P
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6513 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
63d690e94c
commit
f5a28aecb7
|
@ -400,22 +400,37 @@ void ProcessFifoWaitEvents()
|
||||||
{
|
{
|
||||||
MoveEvents();
|
MoveEvents();
|
||||||
|
|
||||||
while (first)
|
if (!first)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (first->time <= globalTimer && first->fifoWait)
|
||||||
{
|
{
|
||||||
if ((first->time <= globalTimer) && first->fifoWait)
|
Event *next = first->next;
|
||||||
{
|
event_types[first->type].callback(first->userdata, (int)(globalTimer - first->time));
|
||||||
|
FreeEvent(first);
|
||||||
Event* evt = first;
|
first = next;
|
||||||
first = first->next;
|
}
|
||||||
event_types[evt->type].callback(evt->userdata, (int)(globalTimer - evt->time));
|
|
||||||
FreeEvent(evt);
|
if (!first)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Event *prev = first;
|
||||||
|
Event *ptr = prev->next;
|
||||||
|
while (ptr)
|
||||||
|
{
|
||||||
|
if (ptr->time <= globalTimer && ptr->fifoWait)
|
||||||
|
{
|
||||||
|
prev->next = ptr->next;
|
||||||
|
event_types[ptr->type].callback(ptr->userdata, (int)(globalTimer - ptr->time));
|
||||||
|
FreeEvent(ptr);
|
||||||
|
ptr = prev->next;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
break;
|
prev = ptr;
|
||||||
|
ptr = ptr->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveEvents()
|
void MoveEvents()
|
||||||
|
|
|
@ -57,7 +57,7 @@ void UnregisterAllEvents();
|
||||||
// userdata MAY NOT CONTAIN POINTERS. userdata might get written and reloaded from disk,
|
// userdata MAY NOT CONTAIN POINTERS. userdata might get written and reloaded from disk,
|
||||||
// when we implement state saves.
|
// when we implement state saves.
|
||||||
void ScheduleEvent(int cyclesIntoFuture, int event_type, u64 userdata=0);
|
void ScheduleEvent(int cyclesIntoFuture, int event_type, u64 userdata=0);
|
||||||
void ScheduleEvent_Threadsafe(int cyclesIntoFuture, int event_type, u64 userdata=0, bool fifoWait=false);
|
void ScheduleEvent_Threadsafe(int cyclesIntoFuture, int event_type, u64 userdata=0, bool fifoWait=true);
|
||||||
void ScheduleEvent_Threadsafe_Immediate(int event_type, u64 userdata=0);
|
void ScheduleEvent_Threadsafe_Immediate(int event_type, u64 userdata=0);
|
||||||
|
|
||||||
// We only permit one event of each type in the queue at a time.
|
// We only permit one event of each type in the queue at a time.
|
||||||
|
|
Loading…
Reference in New Issue