mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-16 08:05:34 -04:00
Fix[input]: floor cursor position before sending to MC
Fixes anticheat false triggers
This commit is contained in:
parent
c2c57ca837
commit
b282d9caee
@ -17,6 +17,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdatomic.h>
|
#include <stdatomic.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
@ -139,7 +140,8 @@ void pojavPumpEvents(void* window) {
|
|||||||
if((pojav_environ->cLastX != pojav_environ->cursorX || pojav_environ->cLastY != pojav_environ->cursorY) && pojav_environ->GLFW_invoke_CursorPos) {
|
if((pojav_environ->cLastX != pojav_environ->cursorX || pojav_environ->cLastY != pojav_environ->cursorY) && pojav_environ->GLFW_invoke_CursorPos) {
|
||||||
pojav_environ->cLastX = pojav_environ->cursorX;
|
pojav_environ->cLastX = pojav_environ->cursorX;
|
||||||
pojav_environ->cLastY = pojav_environ->cursorY;
|
pojav_environ->cLastY = pojav_environ->cursorY;
|
||||||
pojav_environ->GLFW_invoke_CursorPos(window, pojav_environ->cursorX, pojav_environ->cursorY);
|
pojav_environ->GLFW_invoke_CursorPos(window, floor(pojav_environ->cursorX),
|
||||||
|
floor(pojav_environ->cursorY));
|
||||||
}
|
}
|
||||||
|
|
||||||
// The out target index is updated by the rewinder
|
// The out target index is updated by the rewinder
|
||||||
|
Loading…
x
Reference in New Issue
Block a user