From 8ccf32af47d433ab4a65057bc55b474e12ec9486 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Tue, 14 Nov 2017 22:33:56 -0800 Subject: [PATCH] Headless: Fix crash with null GPU. --- GPU/Null/NullGpu.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/GPU/Null/NullGpu.cpp b/GPU/Null/NullGpu.cpp index 95a9b8c157..2772718ec9 100644 --- a/GPU/Null/NullGpu.cpp +++ b/GPU/Null/NullGpu.cpp @@ -15,7 +15,7 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. - +#include "GPU/Common/DrawEngineCommon.h" #include "GPU/Null/NullGpu.h" #include "GPU/GPUState.h" #include "GPU/ge_constants.h" @@ -25,7 +25,17 @@ #include "Core/HLE/sceKernelInterrupt.h" #include "Core/HLE/sceGe.h" -NullGPU::NullGPU() : GPUCommon(nullptr, nullptr) { } +class NullDrawEngine : public DrawEngineCommon { +public: + void DispatchFlush() override { + } + void DispatchSubmitPrim(void *verts, void *inds, GEPrimitiveType prim, int vertexCount, u32 vertType, int *bytesRead) override { + } +}; + +NullGPU::NullGPU() : GPUCommon(nullptr, nullptr) { + drawEngineCommon_ = new NullDrawEngine(); +} NullGPU::~NullGPU() { } void NullGPU::FastRunLoop(DisplayList &list) {