Assorted logging fixes and cleanup

This commit is contained in:
Henrik Rydgård 2025-03-18 13:47:09 +01:00
parent 1b7de6c17b
commit cef14adf67
5 changed files with 9 additions and 7 deletions

View file

@ -2194,7 +2194,7 @@ static u32 sceIoOpenAsync(const char *filename, int flags, int mode) {
FileNode *f = __IoOpen(error, filename, flags, mode);
// We have to return an fd here, which may have been destroyed when we reach Wait if it failed.
if (f == nullptr) {
if (!f) {
_assert_(error != 0);
if (error == SCE_KERNEL_ERROR_NODEV)
return hleLogError(Log::sceIo, error, "device not found");
@ -2223,7 +2223,8 @@ static u32 sceIoOpenAsync(const char *filename, int flags, int mode) {
if (error != 0) {
f->asyncResult = (s64)error;
return hleLogError(Log::sceIo, fd, "file not found");
// This is not necessarily an error, a lot of games check for the presence of files and are fine with no.
return hleLogWarning(Log::sceIo, fd, "file not found");
}
f->asyncResult = fd;

View file

@ -2283,7 +2283,7 @@ static u32 sceKernelStartModule(u32 moduleId, u32 argsize, u32 argAddr, u32 retu
} else if (module->isFake) {
if (returnValueAddr)
Memory::Write_U32(0, returnValueAddr);
return hleLogInfo(Log::sceModule, moduleId, "Faked (undecryptable module)");
return hleLogInfo(Log::sceModule, moduleId, "Faked module");
} else if (module->nm.status == MODULE_STATUS_STARTED) {
// TODO: Maybe should be SCE_KERNEL_ERROR_ALREADY_STARTED, but I get SCE_KERNEL_ERROR_ERROR.
// But I also get crashes...

View file

@ -1753,10 +1753,10 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
void EmuScreen::runImDebugger() {
if (!lastImguiEnabled_ && g_Config.bShowImDebugger) {
System_NotifyUIEvent(UIEventNotification::TEXT_GOTFOCUS);
INFO_LOG(Log::System, "activating keyboard");
VERBOSE_LOG(Log::System, "activating keyboard");
} else if (lastImguiEnabled_ && !g_Config.bShowImDebugger) {
System_NotifyUIEvent(UIEventNotification::TEXT_LOSTFOCUS);
INFO_LOG(Log::System, "deactivating keyboard");
VERBOSE_LOG(Log::System, "deactivating keyboard");
}
lastImguiEnabled_ = g_Config.bShowImDebugger;
if (g_Config.bShowImDebugger) {

View file

@ -164,7 +164,8 @@ struct ImConfig {
int selectedBreakpoint = -1;
int selectedMemCheck = -1;
int selectedAtracCtx = 0;
u32 selectedMemoryBlock = 0;
int selectedMemoryBlock = 0;
uint64_t selectedTexAddr = 0;
bool realtimePixelPreview = false;

View file

@ -1071,7 +1071,7 @@ void NativeFrame(GraphicsContext *graphicsContext) {
for (const auto &item : toProcess) {
if (HandleGlobalMessage(item.message, item.value)) {
// TODO: Add a to-string thingy.
INFO_LOG(Log::System, "Handled global message: %d / %s", (int)item.message, item.value.c_str());
VERBOSE_LOG(Log::System, "Handled global message: %d / %s", (int)item.message, item.value.c_str());
}
g_screenManager->sendMessage(item.message, item.value.c_str());
}