mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-15 07:39:00 -04:00
Increase event buffer size *just a bit*
A 160 times increase won't hurt anybody and provide a bit more resilience
This commit is contained in:
parent
4aeb89922c
commit
323c6e8ace
@ -141,7 +141,7 @@ typedef struct {
|
|||||||
int i4;
|
int i4;
|
||||||
} GLFWInputEvent;
|
} GLFWInputEvent;
|
||||||
static atomic_size_t eventCounter = 0;
|
static atomic_size_t eventCounter = 0;
|
||||||
static GLFWInputEvent events[500];
|
static GLFWInputEvent events[8000];
|
||||||
|
|
||||||
void handleFramebufferSizeJava(long window, int w, int h) {
|
void handleFramebufferSizeJava(long window, int w, int h) {
|
||||||
(*runtimeJNIEnvPtr_JRE)->CallStaticVoidMethod(runtimeJNIEnvPtr_JRE, vmGlfwClass, method_internalWindowSizeChanged, (long)window, w, h);
|
(*runtimeJNIEnvPtr_JRE)->CallStaticVoidMethod(runtimeJNIEnvPtr_JRE, vmGlfwClass, method_internalWindowSizeChanged, (long)window, w, h);
|
||||||
@ -223,7 +223,7 @@ void sendData(int type, int i1, int i2, int i3, int i4) {
|
|||||||
cursorY = i2;
|
cursorY = i2;
|
||||||
}else {
|
}else {
|
||||||
size_t counter = atomic_load_explicit(&eventCounter, memory_order_acquire);
|
size_t counter = atomic_load_explicit(&eventCounter, memory_order_acquire);
|
||||||
if (counter < 499) {
|
if (counter < 7999) {
|
||||||
GLFWInputEvent *event = &events[counter++];
|
GLFWInputEvent *event = &events[counter++];
|
||||||
event->type = type;
|
event->type = type;
|
||||||
event->i1 = i1;
|
event->i1 = i1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user