Get libretro integration working again.

- Fixes #21275

- Fixes #21274
This commit is contained in:
Henrik Rydgård
2026-02-18 10:14:37 +01:00
parent 72640514b5
commit 8b0144dbfc
2 changed files with 9 additions and 2 deletions

View File

@@ -600,11 +600,16 @@ bool PSP_InitStart(const CoreParameter &coreParam) {
Draw::DrawContext *draw = g_CoreParameter.graphicsContext ? g_CoreParameter.graphicsContext->GetDrawContext() : nullptr;
GPUCore gpuCore = g_CoreParameter.gpuCore;
// In libretro, the creation order is different, it's ok with a null draw context here.
// We do need to rework the whole init process.. ugh.
#ifndef __LIBRETRO__
if (!draw && gpuCore != GPUCORE_SOFTWARE) {
ERROR_LOG(Log::Loader, "No drawing context provided.");
g_bootState = BootState::Failed;
return false;
}
#endif
g_CoreParameter.errorString.clear();

View File

@@ -124,8 +124,10 @@ void LibretroVulkanContext::ContextReset() {
void LibretroVulkanContext::ContextDestroy() {
INFO_LOG(Log::G3D, "LibretroVulkanContext::ContextDestroy()");
vk->WaitUntilQueueIdle();
LibretroHWRenderContext::ContextDestroy();
if (vk) {
vk->WaitUntilQueueIdle();
LibretroHWRenderContext::ContextDestroy();
}
}
void LibretroVulkanContext::CreateDrawContext() {