Crash in a more appropriate place if missing a drawcontext (happens on really weak devices only)

This commit is contained in:
Henrik Rydgård 2017-11-29 19:29:53 +01:00
parent 5fff54e804
commit 51a6c67502

View file

@ -742,6 +742,8 @@ extern "C" void Java_org_ppsspp_ppsspp_NativeRenderer_displayInit(JNIEnv * env,
if (javaGL && !graphicsContext) {
graphicsContext = new AndroidJavaEGLGraphicsContext();
} else if (!graphicsContext) {
_assert_msg_(G3D, false, "No graphics context in displayInit?");
}
if (renderer_inited) {
@ -750,7 +752,6 @@ extern "C" void Java_org_ppsspp_ppsspp_NativeRenderer_displayInit(JNIEnv * env,
NativeShutdownGraphics();
NativeDeviceRestore();
NativeInitGraphics(graphicsContext);
ILOG("Restored.");
} else {
ILOG("NativeApp.displayInit() first time");