Logging cleanup

This commit is contained in:
Henrik Rydgård 2025-03-08 12:02:24 +01:00
parent 812b22a224
commit 89e031fb8a
6 changed files with 13 additions and 6 deletions

View file

@ -2047,7 +2047,7 @@ void PlayTimeTracker::Start(const std::string &gameId) {
if (gameId.empty()) { if (gameId.empty()) {
return; return;
} }
INFO_LOG(Log::System, "GameTimeTracker::Start(%s)", gameId.c_str()); VERBOSE_LOG(Log::System, "GameTimeTracker::Start(%s)", gameId.c_str());
auto iter = tracker_.find(std::string(gameId)); auto iter = tracker_.find(std::string(gameId));
if (iter != tracker_.end()) { if (iter != tracker_.end()) {
@ -2070,7 +2070,7 @@ void PlayTimeTracker::Stop(const std::string &gameId) {
return; return;
} }
INFO_LOG(Log::System, "GameTimeTracker::Stop(%s)", gameId.c_str()); VERBOSE_LOG(Log::System, "GameTimeTracker::Stop(%s)", gameId.c_str());
auto iter = tracker_.find(std::string(gameId)); auto iter = tracker_.find(std::string(gameId));
if (iter != tracker_.end()) { if (iter != tracker_.end()) {

View file

@ -860,6 +860,7 @@ u32 Atrac::GetNextSamples() {
if (numSamples > track_.SamplesPerFrame()) if (numSamples > track_.SamplesPerFrame())
numSamples = track_.SamplesPerFrame(); numSamples = track_.SamplesPerFrame();
if (bufferState_ == ATRAC_STATUS_STREAMED_LOOP_FROM_END && (int)numSamples + currentSample_ > track_.endSample) { if (bufferState_ == ATRAC_STATUS_STREAMED_LOOP_FROM_END && (int)numSamples + currentSample_ > track_.endSample) {
// This probably only happens in PPSSPP due to our internal buffer, which needs to go away.
bufferState_ = ATRAC_STATUS_ALL_DATA_LOADED; bufferState_ = ATRAC_STATUS_ALL_DATA_LOADED;
} }
return numSamples; return numSamples;

View file

@ -1347,7 +1347,14 @@ int sceKernelGetThreadExitStatus(SceUID threadID) {
int status = __KernelGetThreadExitStatus(threadID); int status = __KernelGetThreadExitStatus(threadID);
// Seems this is called in a tight-ish loop, maybe awaiting an interrupt - issue #13698 // Seems this is called in a tight-ish loop, maybe awaiting an interrupt - issue #13698
hleEatCycles(330); hleEatCycles(330);
return hleLogDebugOrError(Log::sceKernel, status);
// Some return values don't deserve to be considered errors for logging.
switch (status) {
case SCE_KERNEL_ERROR_NOT_DORMANT:
return hleLogDebug(Log::sceKernel, status);
default:
return hleLogDebugOrError(Log::sceKernel, status);
}
} }
u32 sceKernelGetThreadmanIdType(u32 uid) { u32 sceKernelGetThreadmanIdType(u32 uid) {

View file

@ -467,7 +467,6 @@ void DrawFPS(UIContext *ctx, const Bounds &bounds) {
} }
if (System_GetPropertyBool(SYSPROP_CAN_READ_BATTERY_PERCENTAGE)) { if (System_GetPropertyBool(SYSPROP_CAN_READ_BATTERY_PERCENTAGE)) {
if (g_Config.iShowStatusFlags & (int)ShowStatusFlags::BATTERY_PERCENT) { if (g_Config.iShowStatusFlags & (int)ShowStatusFlags::BATTERY_PERCENT) {
char temp[256];
const int percentage = System_GetPropertyInt(SYSPROP_BATTERY_PERCENTAGE); const int percentage = System_GetPropertyInt(SYSPROP_BATTERY_PERCENTAGE);
// Just plain append battery. Add linebreak? // Just plain append battery. Add linebreak?
buffer.Printf(" Battery: %d%%", percentage); buffer.Printf(" Battery: %d%%", percentage);

View file

@ -1000,7 +1000,7 @@ void DrawAudioDecodersView(ImConfig &cfg, ImControl &control) {
// Show details about the selected atrac context here. // Show details about the selected atrac context here.
char header[32]; char header[32];
snprintf(header, sizeof(header), "Atrac context %d", cfg.selectedAtracCtx); snprintf(header, sizeof(header), "Atrac context %d", cfg.selectedAtracCtx);
if (ImGui::CollapsingHeader(header, ImGuiTreeNodeFlags_DefaultOpen)) { if (ctx && ImGui::CollapsingHeader(header, ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::ProgressBar((float)ctx->CurrentSample() / ctx->GetTrack().endSample, ImVec2(200.0f, 0.0f)); ImGui::ProgressBar((float)ctx->CurrentSample() / ctx->GetTrack().endSample, ImVec2(200.0f, 0.0f));
ImGui::Text("Status: %s", AtracStatusToString(ctx->BufferState())); ImGui::Text("Status: %s", AtracStatusToString(ctx->BufferState()));
ImGui::Text("cur/end sample: %d/%d", ctx->CurrentSample(), ctx->GetTrack().endSample); ImGui::Text("cur/end sample: %d/%d", ctx->CurrentSample(), ctx->GetTrack().endSample);

View file

@ -160,7 +160,7 @@ struct ImConfig {
int selectedFramebuffer = -1; int selectedFramebuffer = -1;
int selectedBreakpoint = -1; int selectedBreakpoint = -1;
int selectedMemCheck = -1; int selectedMemCheck = -1;
int selectedAtracCtx = -1; int selectedAtracCtx = 0;
uint64_t selectedTexAddr = 0; uint64_t selectedTexAddr = 0;
bool realtimePixelPreview = false; bool realtimePixelPreview = false;