Remove dead code path

This commit is contained in:
Henrik Rydgård 2023-09-24 21:41:09 +02:00
parent 7b2657f3ff
commit 2291855a1f

View File

@ -872,6 +872,7 @@ extern "C" void Java_org_ppsspp_ppsspp_NativeApp_pause(JNIEnv *, jclass) {
}
extern "C" void Java_org_ppsspp_ppsspp_NativeApp_shutdown(JNIEnv *, jclass) {
INFO_LOG(SYSTEM, "NativeApp.shutdown() -- begin");
if (renderer_inited && useCPUThread && graphicsContext) {
// Only used in Java EGL path.
EmuThreadStop("shutdown");
@ -891,8 +892,7 @@ extern "C" void Java_org_ppsspp_ppsspp_NativeApp_shutdown(JNIEnv *, jclass) {
EmuThreadJoin();
}
INFO_LOG(SYSTEM, "NativeApp.shutdown() -- begin");
if (renderer_inited) {
if (graphicsContext) {
INFO_LOG(G3D, "Shutting down renderer");
graphicsContext->Shutdown();
delete graphicsContext;
@ -1135,6 +1135,9 @@ void UpdateRunLoopAndroid(JNIEnv *env) {
}
extern "C" void Java_org_ppsspp_ppsspp_NativeRenderer_displayRender(JNIEnv *env, jobject obj) {
// This doesn't get called on the Vulkan path.
_assert_(useCPUThread);
static bool hasSetThreadName = false;
if (!hasSetThreadName) {
hasSetThreadName = true;
@ -1144,13 +1147,9 @@ extern "C" void Java_org_ppsspp_ppsspp_NativeRenderer_displayRender(JNIEnv *env,
if (IsVREnabled() && !StartVRRender())
return;
if (useCPUThread) {
// This is the "GPU thread". Call ThreadFrame.
if (!graphicsContext || !graphicsContext->ThreadFrame()) {
return;
}
} else {
UpdateRunLoopAndroid(env);
// This is the "GPU thread". Call ThreadFrame.
if (!graphicsContext || !graphicsContext->ThreadFrame()) {
return;
}
if (IsVREnabled()) {
@ -1457,6 +1456,7 @@ static void ProcessFrameCommands(JNIEnv *env) {
}
// This runs in Vulkan mode only.
// This handles the entire lifecycle of the Vulkan context, init and exit.
extern "C" bool JNICALL Java_org_ppsspp_ppsspp_NativeActivity_runVulkanRenderLoop(JNIEnv *env, jobject obj, jobject _surf) {
_assert_(!useCPUThread);
@ -1507,11 +1507,11 @@ extern "C" bool JNICALL Java_org_ppsspp_ppsspp_NativeActivity_runVulkanRenderLoo
hasSetThreadName = true;
SetCurrentThreadName("AndroidRender");
}
}
while (!exitRenderLoop) {
LockedNativeUpdateRender();
ProcessFrameCommands(env);
while (!exitRenderLoop) {
LockedNativeUpdateRender();
ProcessFrameCommands(env);
}
}
INFO_LOG(G3D, "Leaving EGL/Vulkan render loop.");