Skip to content

Commit

Permalink
回退至(72a4068)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vera-Firefly committed Oct 16, 2024
1 parent e3a4903 commit 3b5b35a
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,6 @@ public static void setJavaEnvironment(String jreHome) throws Throwable {
envMap.put("LD_LIBRARY_PATH", LD_LIBRARY_PATH);
envMap.put("PATH", jreHome + "/bin:" + Os.getenv("PATH"));

if (FFmpegPlugin.isAvailable) {
envMap.put("PATH", FFmpegPlugin.libraryPath + ":" + Os.getenv("PATH"));
}

envMap.put("AWTSTUB_WIDTH", Integer.toString(CallbackBridge.windowWidth > 0 ? CallbackBridge.windowWidth : CallbackBridge.physicalWidth));
envMap.put("AWTSTUB_HEIGHT", Integer.toString(CallbackBridge.windowHeight > 0 ? CallbackBridge.windowHeight : CallbackBridge.physicalHeight));

Expand Down Expand Up @@ -428,10 +424,6 @@ public static int launchJavaVM(final Activity activity, final Runtime runtime, F
JREUtils.relocateLibPath(runtime, runtimeHome);

setJavaEnvironment(runtimeHome);
if (runtime.javaVersion > 11) {
String libName = runtime.javaVersion == 17 ? "/libjsph17.so" : "/libjsph21.so";
Os.setenv("JSP", NATIVE_LIB_DIR + libName, true);
}

final String graphicsLib = loadGraphicsLibrary();
if (LOCAL_RENDERER != null && !LOCAL_RENDERER.startsWith("opengles"))
Expand Down
11 changes: 0 additions & 11 deletions app_pojavlauncher/src/main/jni/input_bridge_v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,6 @@ void sendData(int type, int i1, int i2, int i3, int i4) {
atomic_fetch_add_explicit(&pojav_environ->eventCounter, 1, memory_order_acquire);
}

jbyteArray convertStr(JNIEnv *env, char *str) {
jsize len = (jsize) strlen(str);
jbyteArray arr = (*env)->NewByteArray(env, len);
(*env)->SetByteArrayRegion(env, arr, 0, len, (jbyte *) str);
return arr;
}

/**
* Hooked version of java.lang.UNIXProcess.forkAndExec()
* which is used to handle the "open" command.
Expand All @@ -239,10 +232,6 @@ hooked_ProcessImpl_forkAndExec(JNIEnv *env, jobject process, jint mode, jbyteArr
// Here we only handle the "xdg-open" command
if (strcmp(basename(pProg), "xdg-open") != 0) {
(*env)->ReleaseByteArrayElements(env, prog, (jbyte *)pProg, 0);
if (getenv("JSP")) {
jbyteArray new_hp = convertStr(env, getenv("JSP"));
return orig_ProcessImpl_forkAndExec(env, process, mode, new_hp, prog, argBlock, argc, envBlock, envc, dir, std_fds, redirectErrorStream);
}
return orig_ProcessImpl_forkAndExec(env, process, mode, helperpath, prog, argBlock, argc, envBlock, envc, dir, std_fds, redirectErrorStream);
}
(*env)->ReleaseByteArrayElements(env, prog, (jbyte *)pProg, 0);
Expand Down
Binary file modified app_pojavlauncher/src/main/jniLibs/arm64-v8a/libjnidispatch.so
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 3b5b35a

Please sign in to comment.