mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 07:20:49 +00:00
Merge pull request #896 from raven02/patch-5
Set accumulatedHcount based on currentHCount
This commit is contained in:
commit
c3bb71ae5b
@ -604,8 +604,9 @@ u32 sceDisplayAdjustAccumulatedHcount() {
|
||||
}
|
||||
|
||||
u32 sceDisplayGetAccumulatedHcount() {
|
||||
// Just do an estimate
|
||||
u32 accumHCount = CoreTiming::GetTicks() / (CoreTiming::GetClockFrequencyMHz() * 1000000 / 60 / 272);
|
||||
float hCountPerVblank = 285.72f; // insprired by jpcsp
|
||||
u32 currentHCount = (CoreTiming::GetTicks() - frameStartTicks) / ((u64)CoreTiming::GetClockFrequencyMHz() * 1000000 / 60 / 272)
|
||||
u32 accumHCount = currentHCount + (u32) (vCount * hCountPerVblank);
|
||||
DEBUG_LOG(HLE,"%i=sceDisplayGetAccumulatedHcount()", accumHCount);
|
||||
return accumHCount;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user