diff --git a/Core/System.cpp b/Core/System.cpp index 385048e367..9e1817fc71 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -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(); diff --git a/libretro/LibretroVulkanContext.cpp b/libretro/LibretroVulkanContext.cpp index 6c1b423ad4..bba79794c7 100644 --- a/libretro/LibretroVulkanContext.cpp +++ b/libretro/LibretroVulkanContext.cpp @@ -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() {