From 0b7e43d05c8ed4d96c43e32a33bf86ce0a4102d4 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 13 Mar 2016 10:38:38 -0700 Subject: [PATCH] Allow the graphicsContext to be overridden. This is useful when coming from, for example, headless. --- Core/System.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Core/System.cpp b/Core/System.cpp index bc7e20b8b3..110f88f04f 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -389,7 +389,9 @@ bool PSP_InitStart(const CoreParameter &coreParam, std::string *error_string) { GraphicsContext *temp = coreParameter.graphicsContext; coreParameter = coreParam; - coreParameter.graphicsContext = temp; + if (coreParameter.graphicsContext == nullptr) { + coreParameter.graphicsContext = temp; + } coreParameter.errorString = ""; pspIsIniting = true;