mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
cellAudio fix
This commit is contained in:
parent
e307a1b4bd
commit
38d5f688b3
3 changed files with 12 additions and 8 deletions
|
|
@ -6,7 +6,8 @@
|
|||
|
||||
#include "util/asm.hpp"
|
||||
|
||||
u64 timebase_offset;
|
||||
static u64 timebase_offset;
|
||||
static u64 systemtime_offset;
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
|
|
@ -157,6 +158,7 @@ void initalize_timebased_time()
|
|||
{
|
||||
timebase_offset = 0;
|
||||
timebase_offset = get_timebased_time();
|
||||
systemtime_offset = timebase_offset / (g_timebase_freq / 1000000);
|
||||
}
|
||||
|
||||
// Returns some relative time in microseconds, don't change this fact
|
||||
|
|
@ -184,9 +186,11 @@ u64 get_system_time()
|
|||
}
|
||||
|
||||
// As get_system_time but obeys Clocks scaling setting
|
||||
u64 get_guest_system_time()
|
||||
u64 get_guest_system_time(u64 time)
|
||||
{
|
||||
return get_system_time() * g_cfg.core.clocks_scale / 100;
|
||||
const u64 result = (time != umax ? time : get_system_time()) * g_cfg.core.clocks_scale / 100;
|
||||
ensure(result >= systemtime_offset);
|
||||
return result - systemtime_offset;
|
||||
}
|
||||
|
||||
// Functions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue