mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-08 12:06:24 +02:00
Android: Set display thread name, release local refs to frame comman strings properly
This commit is contained in:
1 parent
166d07df0c
commit
a9cefe2f3a
1 file changed
+8
@@ -334,6 +334,12 @@ extern "C" void Java_com_henrikrydgard_libnative_NativeRenderer_displayResize(JN
|
||||
}
|
||||
|
||||
extern "C" void Java_com_henrikrydgard_libnative_NativeRenderer_displayRender(JNIEnv *env, jobject obj) {
|
||||
static bool hasSetThreadName = false;
|
||||
if (!hasSetThreadName) {
|
||||
hasSetThreadName = true;
|
||||
setCurrentThreadName("AndroidRender");
|
||||
}
|
||||
|
||||
if (renderer_inited) {
|
||||
// TODO: Look into if these locks are a perf loss
|
||||
{
|
||||
@@ -375,6 +381,8 @@ extern "C" void Java_com_henrikrydgard_libnative_NativeRenderer_displayRender(JN
|
||||
jstring cmd = env->NewStringUTF(frameCmd.command.c_str());
|
||||
jstring param = env->NewStringUTF(frameCmd.params.c_str());
|
||||
env->CallVoidMethod(obj, postCommand, cmd, param);
|
||||
env->DeleteLocalRef(cmd);
|
||||
env->DeleteLocalRef(param);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user