From 9b6dee126df136fb88acdd65abdb18fcad74cced Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 20 May 2018 14:15:09 -0700 Subject: [PATCH] Core: Shutdown properly on load failure. --- Core/System.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Core/System.cpp b/Core/System.cpp index 777804999f..7d467be28e 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -351,13 +351,17 @@ bool PSP_InitUpdate(std::string *error_string) { PSP_SetLoading("Starting graphics..."); success = GPU_Init(coreParameter.graphicsContext, coreParameter.thin3d); if (!success) { - PSP_Shutdown(); *error_string = "Unable to initialize rendering engine."; } } - pspIsInited = success && GPU_IsReady(); - pspIsIniting = success && !pspIsInited; - return !success || pspIsInited; + if (!success) { + PSP_Shutdown(); + return true; + } + + pspIsInited = GPU_IsReady(); + pspIsIniting = !pspIsInited; + return pspIsInited; } bool PSP_Init(const CoreParameter &coreParam, std::string *error_string) {