mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 17:53:42 +01:00
Logging API change (refactor) (#19324)
* Rename LogType to Log * Explicitly use the Log:: enum when logging. Allows for autocomplete when editing. * Mac/ARM64 buildfix * Do the same with the hle result log macros * Rename the log names to mixed case while at it. * iOS buildfix * Qt buildfix attempt, ARM32 buildfix
This commit is contained in:
1 parent
ae3ff686f0
commit
e01ca5b057
393 files changed
+6198
-6193
No files matched your search
+10
-10
@@ -71,7 +71,7 @@ int sceKernelGetSystemTime(u32 sysclockPtr)
|
||||
u64 t = CoreTiming::GetGlobalTimeUs();
|
||||
if (Memory::IsValidAddress(sysclockPtr))
|
||||
Memory::Write_U64(t, sysclockPtr);
|
||||
VERBOSE_LOG(SCEKERNEL, "sceKernelGetSystemTime(out:%16llx)", t);
|
||||
VERBOSE_LOG(Log::sceKernel, "sceKernelGetSystemTime(out:%16llx)", t);
|
||||
hleEatCycles(265);
|
||||
hleReSchedule("system time");
|
||||
return 0;
|
||||
@@ -81,7 +81,7 @@ u32 sceKernelGetSystemTimeLow()
|
||||
{
|
||||
// This clock should tick at 1 Mhz.
|
||||
u64 t = CoreTiming::GetGlobalTimeUs();
|
||||
VERBOSE_LOG(SCEKERNEL,"%08x=sceKernelGetSystemTimeLow()",(u32)t);
|
||||
VERBOSE_LOG(Log::sceKernel,"%08x=sceKernelGetSystemTimeLow()",(u32)t);
|
||||
hleEatCycles(165);
|
||||
hleReSchedule("system time");
|
||||
return (u32)t;
|
||||
@@ -90,7 +90,7 @@ u32 sceKernelGetSystemTimeLow()
|
||||
u64 sceKernelGetSystemTimeWide()
|
||||
{
|
||||
u64 t = CoreTiming::GetGlobalTimeUsScaled();
|
||||
VERBOSE_LOG(SCEKERNEL,"%i=sceKernelGetSystemTimeWide()",(u32)t);
|
||||
VERBOSE_LOG(Log::sceKernel,"%i=sceKernelGetSystemTimeWide()",(u32)t);
|
||||
hleEatCycles(250);
|
||||
hleReSchedule("system time");
|
||||
return t;
|
||||
@@ -98,7 +98,7 @@ u64 sceKernelGetSystemTimeWide()
|
||||
|
||||
int sceKernelUSec2SysClock(u32 usec, u32 clockPtr)
|
||||
{
|
||||
VERBOSE_LOG(SCEKERNEL, "sceKernelUSec2SysClock(%i, %08x)", usec, clockPtr);
|
||||
VERBOSE_LOG(Log::sceKernel, "sceKernelUSec2SysClock(%i, %08x)", usec, clockPtr);
|
||||
if (Memory::IsValidAddress(clockPtr))
|
||||
Memory::Write_U64((usec & 0xFFFFFFFFL), clockPtr);
|
||||
hleEatCycles(165);
|
||||
@@ -107,14 +107,14 @@ int sceKernelUSec2SysClock(u32 usec, u32 clockPtr)
|
||||
|
||||
u64 sceKernelUSec2SysClockWide(u32 usec)
|
||||
{
|
||||
VERBOSE_LOG(SCEKERNEL, "sceKernelUSec2SysClockWide(%i)", usec);
|
||||
VERBOSE_LOG(Log::sceKernel, "sceKernelUSec2SysClockWide(%i)", usec);
|
||||
hleEatCycles(150);
|
||||
return usec;
|
||||
}
|
||||
|
||||
int sceKernelSysClock2USec(u32 sysclockPtr, u32 highPtr, u32 lowPtr)
|
||||
{
|
||||
DEBUG_LOG(SCEKERNEL, "sceKernelSysClock2USec(clock = %08x, lo = %08x, hi = %08x)", sysclockPtr, highPtr, lowPtr);
|
||||
DEBUG_LOG(Log::sceKernel, "sceKernelSysClock2USec(clock = %08x, lo = %08x, hi = %08x)", sysclockPtr, highPtr, lowPtr);
|
||||
u64 time = Memory::Read_U64(sysclockPtr);
|
||||
u32 highResult = (u32)(time / 1000000);
|
||||
u32 lowResult = (u32)(time % 1000000);
|
||||
@@ -129,7 +129,7 @@ int sceKernelSysClock2USec(u32 sysclockPtr, u32 highPtr, u32 lowPtr)
|
||||
int sceKernelSysClock2USecWide(u32 lowClock, u32 highClock, u32 lowPtr, u32 highPtr)
|
||||
{
|
||||
u64 sysClock = lowClock | ((u64)highClock << 32);
|
||||
DEBUG_LOG(SCEKERNEL, "sceKernelSysClock2USecWide(clock = %llu, lo = %08x, hi = %08x)", sysClock, lowPtr, highPtr);
|
||||
DEBUG_LOG(Log::sceKernel, "sceKernelSysClock2USecWide(clock = %llu, lo = %08x, hi = %08x)", sysClock, lowPtr, highPtr);
|
||||
if (Memory::IsValidAddress(lowPtr)) {
|
||||
Memory::Write_U32((u32)(sysClock / 1000000), lowPtr);
|
||||
if (Memory::IsValidAddress(highPtr))
|
||||
@@ -144,7 +144,7 @@ int sceKernelSysClock2USecWide(u32 lowClock, u32 highClock, u32 lowPtr, u32 high
|
||||
u32 sceKernelLibcClock()
|
||||
{
|
||||
u32 retVal = (u32) CoreTiming::GetGlobalTimeUs();
|
||||
DEBUG_LOG(SCEKERNEL, "%i = sceKernelLibcClock", retVal);
|
||||
DEBUG_LOG(Log::sceKernel, "%i = sceKernelLibcClock", retVal);
|
||||
hleEatCycles(330);
|
||||
hleReSchedule("libc clock");
|
||||
return retVal;
|
||||
@@ -154,7 +154,7 @@ u32 sceKernelLibcTime(u32 outPtr)
|
||||
{
|
||||
u32 t = (u32) start_time + (u32) (CoreTiming::GetGlobalTimeUs() / 1000000ULL);
|
||||
|
||||
DEBUG_LOG(SCEKERNEL, "%i = sceKernelLibcTime(%08X)", t, outPtr);
|
||||
DEBUG_LOG(Log::sceKernel, "%i = sceKernelLibcTime(%08X)", t, outPtr);
|
||||
// The PSP sure takes its sweet time on this function.
|
||||
hleEatCycles(3385);
|
||||
|
||||
@@ -176,7 +176,7 @@ u32 sceKernelLibcGettimeofday(u32 timeAddr, u32 tzAddr)
|
||||
__RtcTimeOfDay(tv);
|
||||
}
|
||||
|
||||
DEBUG_LOG(SCEKERNEL,"sceKernelLibcGettimeofday(%08x, %08x)", timeAddr, tzAddr);
|
||||
DEBUG_LOG(Log::sceKernel,"sceKernelLibcGettimeofday(%08x, %08x)", timeAddr, tzAddr);
|
||||
hleEatCycles(1885);
|
||||
|
||||
hleReSchedule("libc timeofday");
|
||||
|
||||
Reference in new issue
Block a user