summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/android/os_android.cpp34
-rw-r--r--platform/javascript/detect.py9
2 files changed, 6 insertions, 37 deletions
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 9156181bbe..defee8f1f1 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -49,9 +49,6 @@
#include "java_godot_io_wrapper.h"
#include "java_godot_wrapper.h"
-#define PAN_GESTURE_MIN_DELTA 5 // only advertise PanGesture event with dx and dy greater than this
-#define MAGNIFY_GESTURE_MIN_FACTOR 0.1 // only advertise MagnifyGesture event with a factor difference from 1.0 greater than this
-
class AndroidLogger : public Logger {
public:
virtual void logv(const char *p_format, va_list p_list, bool p_err) {
@@ -409,35 +406,6 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
ERR_FAIL_COND(touch.size() != p_points.size());
- if (touch.size() == 1) {
- Point2 d = (p_points[0].pos - touch.write[0].pos);
- if (fabs(d.x) > PAN_GESTURE_MIN_DELTA || fabs(d.y) > PAN_GESTURE_MIN_DELTA) {
- Ref<InputEventPanGesture> ev;
- ev.instance();
- ev->set_position(p_points[0].pos);
- ev->set_delta(d);
- input->parse_input_event(ev);
- touch.write[0].pos = p_points[0].pos;
- }
- } else if (touch.size() == 2) {
- Point2 v0 = touch[1].pos - touch[0].pos;
- float l0 = (v0.x * v0.x) + (v0.y * v0.y);
- if (l0 != 0.0) {
- Point2 v1 = p_points[1].pos - p_points[0].pos;
- float l1 = (v1.x * v1.x) + (v1.y * v1.y);
- float f = (l1 / l0);
- if (fabs(f - 1.0) > MAGNIFY_GESTURE_MIN_FACTOR) {
- Ref<InputEventMagnifyGesture> ev;
- ev.instance();
- ev->set_position(p_points[0].pos + v1 / 2);
- ev->set_factor(sqrt(f));
- input->parse_input_event(ev);
- touch.write[0].pos = p_points[0].pos;
- touch.write[1].pos = p_points[1].pos;
- }
- }
- }
-
for (int i = 0; i < touch.size(); i++) {
int idx = -1;
@@ -452,7 +420,7 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
ERR_CONTINUE(idx == -1);
if (touch[i].pos == p_points[idx].pos)
- continue; //no unnecessary move
+ continue; //no move unncesearily
Ref<InputEventScreenDrag> ev;
ev.instance();
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index a0d6ac9214..a63fa90067 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -82,10 +82,7 @@ def configure(env):
env['CXX'] = 'em++'
env['LINK'] = 'emcc'
- # Emscripten's ar has issues with duplicate file names, so use cc.
- env['AR'] = 'emcc'
- env['ARFLAGS'] = '-o'
- # emranlib is a noop, so it's safe to use with AR=emcc.
+ env['AR'] = 'emar'
env['RANLIB'] = 'emranlib'
# Use TempFileMunge since some AR invocations are too long for cmd.exe.
@@ -127,6 +124,10 @@ def configure(env):
## Link flags
+ # We use IDBFS in javascript_main.cpp. Since Emscripten 1.39.1 it needs to
+ # be linked explicitly.
+ env.Append(LIBS=['idbfs.js'])
+
env.Append(LINKFLAGS=['-s', 'BINARYEN=1'])
# Allow increasing memory buffer size during runtime. This is efficient