mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-20 13:30:15 -07:00
Changes
- Remove "id=inheritsFrom" - [Mod installer] Fix JNI thread attach. Current TODO: complete "inheritsFrom" implementation to get Fabric to work.
This commit is contained in:
parent
c0d09d4f5f
commit
d00035d645
4 changed files with 5 additions and 8 deletions
|
|
@ -168,11 +168,7 @@ public final class Tools
|
||||||
javaArgList.addAll(overrideableArgList);
|
javaArgList.addAll(overrideableArgList);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String[] getMinecraftArgs(MCProfile.Builder profile, JMinecraftVersionList.Version versionInfo)
|
public static String[] getMinecraftArgs(MCProfile.Builder profile, JMinecraftVersionList.Version versionInfo) {
|
||||||
{
|
|
||||||
if(versionInfo.inheritsFrom != null) {
|
|
||||||
versionInfo.id = versionInfo.inheritsFrom;
|
|
||||||
}
|
|
||||||
String username = profile.getUsername();
|
String username = profile.getUsername();
|
||||||
String versionName = profile.getVersion();
|
String versionName = profile.getVersion();
|
||||||
if(versionInfo.inheritsFrom != null) {
|
if(versionInfo.inheritsFrom != null) {
|
||||||
|
|
@ -244,12 +240,12 @@ public final class Tools
|
||||||
|
|
||||||
private static String[] splitAndFilterEmpty(String argStr) {
|
private static String[] splitAndFilterEmpty(String argStr) {
|
||||||
List<String> strList = new ArrayList<String>();
|
List<String> strList = new ArrayList<String>();
|
||||||
strList.add("--fullscreen");
|
|
||||||
for (String arg : argStr.split(" ")) {
|
for (String arg : argStr.split(" ")) {
|
||||||
if (!arg.isEmpty()) {
|
if (!arg.isEmpty()) {
|
||||||
strList.add(arg);
|
strList.add(arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
strList.add("--fullscreen");
|
||||||
return strList.toArray(new String[0]);
|
return strList.toArray(new String[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
// int printed = 0;
|
// int printed = 0;
|
||||||
JNIEXPORT jboolean JNICALL Java_net_kdt_pojavlaunch_JREUtils_renderAWTScreenFrame(JNIEnv* env, jclass clazz, jobject canvas, jint width, jint height) {
|
JNIEXPORT jboolean JNICALL Java_net_kdt_pojavlaunch_JREUtils_renderAWTScreenFrame(JNIEnv* env, jclass clazz, jobject canvas, jint width, jint height) {
|
||||||
if (runtimeJNIEnvPtr_ANDROID == NULL) {
|
if (runtimeJNIEnvPtr_ANDROID == NULL) {
|
||||||
|
isUseStackQueueCall = true;
|
||||||
attachThread(true, &runtimeJNIEnvPtr_ANDROID);
|
attachThread(true, &runtimeJNIEnvPtr_ANDROID);
|
||||||
// return JNI_FALSE;
|
// return JNI_FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ int grabCursorX, grabCursorY, lastCursorX, lastCursorY;
|
||||||
jclass inputBridgeClass_ANDROID, inputBridgeClass_JRE;
|
jclass inputBridgeClass_ANDROID, inputBridgeClass_JRE;
|
||||||
jmethodID inputBridgeMethod_ANDROID, inputBridgeMethod_JRE;
|
jmethodID inputBridgeMethod_ANDROID, inputBridgeMethod_JRE;
|
||||||
|
|
||||||
jboolean isGrabbing, isUseStackQueueCall;
|
jboolean isGrabbing;
|
||||||
|
|
||||||
jint JNI_OnLoad(JavaVM* vm, void* reserved) {
|
jint JNI_OnLoad(JavaVM* vm, void* reserved) {
|
||||||
if (dalvikJavaVMPtr == NULL) {
|
if (dalvikJavaVMPtr == NULL) {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ JNIEnv* dalvikJNIEnvPtr_JRE;
|
||||||
|
|
||||||
long showingWindow;
|
long showingWindow;
|
||||||
|
|
||||||
bool isInputReady, isCursorEntered, isPrepareGrabPos;
|
bool isInputReady, isCursorEntered, isPrepareGrabPos, isUseStackQueueCall;
|
||||||
|
|
||||||
jboolean attachThread(bool isAndroid, JNIEnv** secondJNIEnvPtr);
|
jboolean attachThread(bool isAndroid, JNIEnv** secondJNIEnvPtr);
|
||||||
char** convert_to_char_array(JNIEnv *env, jobjectArray jstringArray);
|
char** convert_to_char_array(JNIEnv *env, jobjectArray jstringArray);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue