Try to make DTK rewrite handle events the same way as the old code.

This commit is contained in:
magumagu
2014-06-18 12:11:09 -07:00
parent a282f181cd
commit 1f604e87be
4 changed files with 11 additions and 33 deletions

View File

@ -56,6 +56,7 @@ This file mainly deals with the [Drive I/F], however [AIDFR] controls
#include "Core/CoreTiming.h"
#include "Core/HW/AudioInterface.h"
#include "Core/HW/CPU.h"
#include "Core/HW/DVDInterface.h"
#include "Core/HW/MMIO.h"
#include "Core/HW/ProcessorInterface.h"
#include "Core/HW/SystemTimers.h"
@ -202,6 +203,9 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
m_Control.PSTAT = tmpAICtrl.PSTAT;
g_LastCPUTime = CoreTiming::GetTicks();
// Tell Drive Interface to start/stop streaming
DVDInterface::g_bStream = tmpAICtrl.PSTAT;
CoreTiming::RemoveEvent(et_AI);
CoreTiming::ScheduleEvent(((int)GetAIPeriod() / 2), et_AI);
}
@ -306,9 +310,4 @@ u64 GetAIPeriod()
return period;
}
bool IsAISPlaying()
{
return m_Control.PSTAT;
}
} // end of namespace AudioInterface