feat: updated engine

This commit is contained in:
Sara Gerretsen 2026-07-10 17:04:34 +02:00
parent cbe99774ff
commit f4cf6b3999
6607 changed files with 910135 additions and 430025 deletions

View file

@ -33,6 +33,8 @@
#include "android_keys_utils.h"
#include "display_server_android.h"
#include "core/input/input.h"
void AndroidInputHandler::process_joy_event(AndroidInputHandler::JoypadEvent p_event) {
switch (p_event.type) {
case JOY_EVENT_BUTTON:
@ -132,7 +134,7 @@ void AndroidInputHandler::process_key_event(int p_physical_keycode, int p_unicod
if (p_physical_keycode == AKEYCODE_BACK && p_pressed) {
if (DisplayServerAndroid *dsa = Object::cast_to<DisplayServerAndroid>(DisplayServer::get_singleton())) {
dsa->send_window_event(DisplayServer::WINDOW_EVENT_GO_BACK_REQUEST, true);
dsa->send_window_event(DisplayServerEnums::WINDOW_EVENT_GO_BACK_REQUEST, true);
}
}
@ -144,7 +146,7 @@ void AndroidInputHandler::_cancel_all_touch() {
touch.clear();
}
void AndroidInputHandler::_parse_all_touch(bool p_pressed, bool p_canceled, bool p_double_tap) {
void AndroidInputHandler::_parse_all_touch(bool p_pressed, bool p_canceled) {
if (touch.size()) {
//end all if exist
for (int i = 0; i < touch.size(); i++) {
@ -154,7 +156,7 @@ void AndroidInputHandler::_parse_all_touch(bool p_pressed, bool p_canceled, bool
ev->set_pressed(p_pressed);
ev->set_canceled(p_canceled);
ev->set_position(touch[i].pos);
ev->set_double_tap(p_double_tap);
ev->set_double_tap(touch[i].double_tap);
Input::get_singleton()->parse_input_event(ev);
}
}
@ -165,7 +167,7 @@ void AndroidInputHandler::_release_all_touch() {
touch.clear();
}
void AndroidInputHandler::process_touch_event(int p_event, int p_pointer, const Vector<TouchPos> &p_points, bool p_double_tap) {
void AndroidInputHandler::process_touch_event(int p_event, int p_pointer, const Vector<TouchPos> &p_points) {
switch (p_event) {
case AMOTION_EVENT_ACTION_DOWN: { //gesture begin
// Release any remaining touches or mouse event
@ -178,10 +180,11 @@ void AndroidInputHandler::process_touch_event(int p_event, int p_pointer, const
touch.write[i].pos = p_points[i].pos;
touch.write[i].pressure = p_points[i].pressure;
touch.write[i].tilt = p_points[i].tilt;
touch.write[i].double_tap = p_points[i].double_tap;
}
//send touch
_parse_all_touch(true, false, p_double_tap);
_parse_all_touch(true, false);
} break;
case AMOTION_EVENT_ACTION_MOVE: { //motion