diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index 03ed76b41d..268b3ce172 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -707,6 +707,7 @@ void ImportFuncSymbol(const FuncSymbolImport &func, bool reimporting, const char void ExportFuncSymbol(const FuncSymbolExport &func) { if (FuncImportIsHLE(func.moduleName, func.nid)) { // HLE covers this already - let's ignore the function. + // This means that we loaded a module that we are HLE:ing, which is kinda unnecessary, but not harmful. And might even be good. WARN_LOG(Log::Loader, "Ignoring func export %s/%08x, already implemented in HLE.", func.moduleName, func.nid); return; } diff --git a/UI/ImDebugger/ImGe.cpp b/UI/ImDebugger/ImGe.cpp index eebe5bf7f6..89d0c256fe 100644 --- a/UI/ImDebugger/ImGe.cpp +++ b/UI/ImDebugger/ImGe.cpp @@ -44,7 +44,11 @@ void DrawTexturesWindow(ImConfig &cfg, TextureCacheCommon *textureCache) { return; } - textureCache->DrawImGuiDebug(cfg.selectedTexAddr); + if (textureCache) { + textureCache->DrawImGuiDebug(cfg.selectedTexAddr); + } else { + ImGui::TextUnformatted("Texture cache not available"); + } ImGui::End(); } @@ -56,22 +60,28 @@ void DrawDisplayWindow(ImConfig &cfg, FramebufferManagerCommon *framebufferManag return; } - ImGui::Checkbox("Display latched", &cfg.displayLatched); + if (framebufferManager) { + ImGui::Checkbox("Display latched", &cfg.displayLatched); - PSPPointer topaddr; - u32 linesize; - u32 pixelFormat; + PSPPointer topaddr; + u32 linesize; + u32 pixelFormat; - __DisplayGetFramebuf(&topaddr, &linesize, &pixelFormat, cfg.displayLatched); + __DisplayGetFramebuf(&topaddr, &linesize, &pixelFormat, cfg.displayLatched); - VirtualFramebuffer *fb = framebufferManager->GetVFBAt(topaddr.ptr); - if (fb && fb->fbo) { - ImTextureID texId = ImGui_ImplThin3d_AddFBAsTextureTemp(fb->fbo, Draw::Aspect::COLOR_BIT, ImGuiPipeline::TexturedOpaque); - ImGui::Image(texId, ImVec2(fb->width, fb->height)); - ImGui::Text("%s - %08x", fb->fbo->Tag(), topaddr.ptr); + VirtualFramebuffer *fb = framebufferManager->GetVFBAt(topaddr.ptr); + if (fb && fb->fbo) { + ImTextureID texId = ImGui_ImplThin3d_AddFBAsTextureTemp(fb->fbo, Draw::Aspect::COLOR_BIT, ImGuiPipeline::TexturedOpaque); + ImGui::Image(texId, ImVec2(fb->width, fb->height)); + ImGui::Text("%s - %08x", fb->fbo->Tag(), topaddr.ptr); + } else { + // TODO: Sometimes we should display RAM here. + ImGui::Text("Framebuffer not available to display"); + } } else { - // TODO: Sometimes we should display RAM here. - ImGui::Text("Framebuffer not available to display"); + // TODO: We should implement this anyway for software mode. + // In the meantime, use the pixel viewer. + ImGui::TextUnformatted("Framebuffer manager not available"); } ImGui::End();