- Automatically set overrideWidth and overrideHeight - Multi-context moment. Current status of Forge 1.12.2: Exception type: EXC_BAD_ACCESS (SIGSEGV) Exception subtype: KERN_INVALID_ADDRESS: 0x964 Exception codes: 0x0000000000000001, 0x0000000000000964 Culprit: Unknown VM Protection: 0x964 is not in any region. Triggered by thread: 20 Thread name: Call stack: 0 libgl4es_115.dylib 0x000000012196738c 0x121900000 + 422796 // realize_glenv 1 libgl4es_115.dylib 0x00000001219672dc 0x121900000 + 422620 // realize_glenv 2 libgl4es_115.dylib 0x0000000121966e78 0x121900000 + 421496 // fpe_glDrawArrays 3 libgl4es_115.dylib 0x000000012199d4e4 0x121900000 + 644324 // draw_renderlist 4 libgl4es_115.dylib 0x000000012197e39c 0x121900000 + 517020 // gl4es_flush 5 libgl4es_115.dylib 0x00000001219609e4 0x121900000 + 395748 // proxy_glEnable
79 lines
3.1 KiB
Objective-C
79 lines
3.1 KiB
Objective-C
#pragma once
|
|
|
|
#import "MGLKit.h"
|
|
#include <stdbool.h>
|
|
#include "jni.h"
|
|
|
|
#define ACTION_DOWN 0
|
|
#define ACTION_UP 1
|
|
#define ACTION_MOVE 2
|
|
|
|
#define BUTTON1_DOWN_MASK 1 << 10 // left btn
|
|
#define BUTTON2_DOWN_MASK 1 << 11 // mid btn
|
|
#define BUTTON3_DOWN_MASK 1 << 12 // right btn
|
|
|
|
#define EVENT_TYPE_CHAR 1000
|
|
#define EVENT_TYPE_CHAR_MODS 1001
|
|
#define EVENT_TYPE_CURSOR_ENTER 1002
|
|
#define EVENT_TYPE_CURSOR_POS 1003
|
|
#define EVENT_TYPE_FRAMEBUFFER_SIZE 1004
|
|
#define EVENT_TYPE_KEY 1005
|
|
#define EVENT_TYPE_MOUSE_BUTTON 1006
|
|
#define EVENT_TYPE_SCROLL 1007
|
|
#define EVENT_TYPE_WINDOW_POS 1008
|
|
#define EVENT_TYPE_WINDOW_SIZE 1009
|
|
|
|
#define SPECIALBTN_KEYBOARD -1
|
|
#define SPECIALBTN_TOGGLECTRL -2
|
|
#define SPECIALBTN_MOUSEPRI -3
|
|
#define SPECIALBTN_MOUSESEC -4
|
|
#define SPECIALBTN_VIRTUALMOUSE -5
|
|
#define SPECIALBTN_MOUSEMID -6
|
|
#define SPECIALBTN_SCROLLUP -7
|
|
#define SPECIALBTN_SCROLLDOWN -8
|
|
|
|
MGLSharegroup* sharegroup;
|
|
|
|
void* GL4ES_HANDLE;
|
|
|
|
JavaVM* runtimeJavaVMPtr;
|
|
JNIEnv* runtimeJNIEnvPtr_ANDROID;
|
|
JNIEnv* runtimeJNIEnvPtr_JRE;
|
|
|
|
JNIEnv* dalvikJNIEnvPtr_ANDROID;
|
|
JNIEnv* dalvikJNIEnvPtr_JRE;
|
|
|
|
long showingWindow;
|
|
|
|
bool isInputReady, isCursorEntered, isPrepareGrabPos, isUseStackQueueCall;
|
|
|
|
jboolean isGrabbing;
|
|
|
|
int savedWidth, savedHeight;
|
|
|
|
jboolean attachThread(bool isAndroid, JNIEnv** secondJNIEnvPtr);
|
|
char** convert_to_char_array(JNIEnv *env, jobjectArray jstringArray);
|
|
jobjectArray convert_from_char_array(JNIEnv *env, char **charArray, int num_rows);
|
|
void free_char_array(JNIEnv *env, jobjectArray jstringArray, const char **charArray);
|
|
jstring convertStringJVM(JNIEnv* srcEnv, JNIEnv* dstEnv, jstring srcStr);
|
|
|
|
void sendData(int type, int i1, int i2, int i3, int i4);
|
|
|
|
void closeGLFWWindow();
|
|
void callback_LauncherViewController_installMinecraft();
|
|
void callback_SurfaceViewController_launchMinecraft(int width, int height);
|
|
void callback_SurfaceViewController_onTouch(int event, int x, int y);
|
|
int callback_SurfaceViewController_touchHotbar(int x, int y);
|
|
|
|
JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeSendChar(JNIEnv* env, jclass clazz, jchar codepoint /* jint codepoint */);
|
|
JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeSendCharMods(JNIEnv* env, jclass clazz, jchar codepoint, jint mods);
|
|
JNIEXPORT void JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeSendCursorPos(JNIEnv* env, jclass clazz, jint x, jint y);
|
|
JNIEXPORT void JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeSendKey(JNIEnv* env, jclass clazz, jint key, jint scancode, jint action, jint mods);
|
|
JNIEXPORT void JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeSendKeycode(JNIEnv* env, jclass clazz, jint keycode, jchar keychar, jint scancode, jint action, jint mods);
|
|
JNIEXPORT void JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeSendMouseButton(JNIEnv* env, jclass clazz, jint button, jint action, jint mods);
|
|
JNIEXPORT void JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeSendScreenSize(JNIEnv* env, jclass clazz, jint width, jint height);
|
|
JNIEXPORT void JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeSendScroll(JNIEnv* env, jclass clazz, jdouble xoffset, jdouble yoffset);
|
|
JNIEXPORT void JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeSendWindowPos(JNIEnv* env, jclass clazz, jint x, jint y);
|
|
|
|
|