mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Add a comment, some additional cleanup
This commit is contained in:
parent
7e427e41d1
commit
3fd5190271
@ -363,11 +363,6 @@ void RemoveEvent(int event_type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoveAllEvents(int event_type)
|
|
||||||
{
|
|
||||||
RemoveEvent(event_type);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ProcessEvents() {
|
void ProcessEvents() {
|
||||||
while (first) {
|
while (first) {
|
||||||
if (first->time <= (s64)GetTicks()) {
|
if (first->time <= (s64)GetTicks()) {
|
||||||
@ -482,8 +477,7 @@ std::string GetScheduledEventsSummary() {
|
|||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Event_DoState(PointerWrap &p, BaseEvent *ev)
|
void Event_DoState(PointerWrap &p, BaseEvent *ev) {
|
||||||
{
|
|
||||||
// There may be padding, so do each one individually.
|
// There may be padding, so do each one individually.
|
||||||
Do(p, ev->time);
|
Do(p, ev->time);
|
||||||
Do(p, ev->userdata);
|
Do(p, ev->userdata);
|
||||||
@ -491,8 +485,7 @@ void Event_DoState(PointerWrap &p, BaseEvent *ev)
|
|||||||
usedEventTypes.insert(ev->type);
|
usedEventTypes.insert(ev->type);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Event_DoStateOld(PointerWrap &p, BaseEvent *ev)
|
void Event_DoStateOld(PointerWrap &p, BaseEvent *ev) {
|
||||||
{
|
|
||||||
Do(p, *ev);
|
Do(p, *ev);
|
||||||
usedEventTypes.insert(ev->type);
|
usedEventTypes.insert(ev->type);
|
||||||
}
|
}
|
||||||
@ -521,10 +514,11 @@ void DoState(PointerWrap &p) {
|
|||||||
restoredEventTypes.clear();
|
restoredEventTypes.clear();
|
||||||
|
|
||||||
if (s >= 3) {
|
if (s >= 3) {
|
||||||
DoLinkedList<BaseEvent, GetNewEvent, FreeEvent, Event_DoState>(p, first, (Event **) NULL);
|
DoLinkedList<BaseEvent, GetNewEvent, FreeEvent, Event_DoState>(p, first, (Event **)nullptr);
|
||||||
|
// This is here because we previously stored a second queue of "threadsafe" events. Gone now. Remove in the next section version upgrade.
|
||||||
DoIgnoreUnusedLinkedList(p);
|
DoIgnoreUnusedLinkedList(p);
|
||||||
} else {
|
} else {
|
||||||
DoLinkedList<BaseEvent, GetNewEvent, FreeEvent, Event_DoStateOld>(p, first, (Event **) NULL);
|
DoLinkedList<BaseEvent, GetNewEvent, FreeEvent, Event_DoStateOld>(p, first, (Event **)nullptr);
|
||||||
DoIgnoreUnusedLinkedList(p);
|
DoIgnoreUnusedLinkedList(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,10 +95,8 @@ namespace CoreTiming
|
|||||||
s64 UnscheduleEvent(int event_type, u64 userdata);
|
s64 UnscheduleEvent(int event_type, u64 userdata);
|
||||||
|
|
||||||
void RemoveEvent(int event_type);
|
void RemoveEvent(int event_type);
|
||||||
void RemoveAllEvents(int event_type);
|
|
||||||
bool IsScheduled(int event_type);
|
bool IsScheduled(int event_type);
|
||||||
void Advance();
|
void Advance();
|
||||||
void ProcessFifoWaitEvents();
|
|
||||||
void ForceCheck();
|
void ForceCheck();
|
||||||
|
|
||||||
// Pretend that the main CPU has executed enough cycles to reach the next event.
|
// Pretend that the main CPU has executed enough cycles to reach the next event.
|
||||||
|
@ -179,7 +179,7 @@ static void __KernelUmdActivate()
|
|||||||
__KernelNotifyCallback(driveCBId, notifyArg);
|
__KernelNotifyCallback(driveCBId, notifyArg);
|
||||||
|
|
||||||
// Don't activate immediately, take time to "spin up."
|
// Don't activate immediately, take time to "spin up."
|
||||||
CoreTiming::RemoveAllEvents(umdStatChangeEvent);
|
CoreTiming::RemoveEvent(umdStatChangeEvent);
|
||||||
CoreTiming::ScheduleEvent(usToCycles(MICRO_DELAY_ACTIVATE), umdStatChangeEvent, 1);
|
CoreTiming::ScheduleEvent(usToCycles(MICRO_DELAY_ACTIVATE), umdStatChangeEvent, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ static void __KernelUmdDeactivate()
|
|||||||
if (driveCBId != 0)
|
if (driveCBId != 0)
|
||||||
__KernelNotifyCallback(driveCBId, notifyArg);
|
__KernelNotifyCallback(driveCBId, notifyArg);
|
||||||
|
|
||||||
CoreTiming::RemoveAllEvents(umdStatChangeEvent);
|
CoreTiming::RemoveEvent(umdStatChangeEvent);
|
||||||
__UmdStatChange(0, 0);
|
__UmdStatChange(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user