Commit Graph

32 Commits

Author SHA1 Message Date
Hang Li f2a172ba67 fix : can not listen to onKeyUp event for Android (#1514)
这里 event.action 强制写死成了 PRESS,那么之后 eventName 就一直是onKeyDown.
2018-09-19 15:59:55 +08:00
W-MTZing b46209b4e7 adjust c++ call java function rename (#1498) 2018-09-05 13:43:28 +08:00
W-MTZing d27e5a798c remove log names about cocos (#1496) 2018-09-05 10:51:42 +08:00
W-MTZing 9e28e3420f fix JNI call bug (#1475) 2018-08-24 14:00:48 +08:00
W-MTZing 935a759cf4 rename c++ call java function by macro (#1468) 2018-08-22 14:07:17 +08:00
W-MTZing e284a0efd1 rename jni function by macro (#1467)
* rename jni function by macro

* modify JNI macro name
2018-08-22 09:21:35 +08:00
leda 0ccc890843 added dispatchKeyboardEvent for android (#1453)
* added dispatchKeyboardEvent for android

* uniform enum class type to uint8
2018-08-13 10:40:23 +08:00
leda 19ab61b252 refine TODO & FIXME flag (#1450)
* change TODO to REFINE

* change REFINE:cjh to REFINE

* change FIXME to IDEA

* improve format
2018-08-10 12:52:00 +08:00
minggo 5f1d13d3eb Terminate app elegant (#1448)
* remove native finish, improve exitApplicationJNI

* destruct application when app.end called on iOS

* exit app elegantly
2018-08-08 17:28:29 +08:00
leda 86122c859a close audio device when destruct Application (#1442)
* close audio device when destruct Application

* added android

* correct header include

* remove TODO: destroy DeviceGraphics
2018-08-08 08:55:26 +08:00
minggo b3122ea9e5 add a function to terminate application (#1434) 2018-08-02 10:46:35 +08:00
leda 64643b4922 fix build crash on android when enable AnySDK (#1397)
* disable anysdk comments in link template

* extra init callback when JNI_OnLoad

* add some comment to explain both init function

* sync changes from link template to default for android
2018-07-19 09:55:51 +08:00
James Chen 712173a8de Supports DeviceMotionEvent and removes more unused code. (#1275)
* Binds Device class

* Removes ccFPSImage.c/h

* Updates Android.mk

* Supports DeviceMotionEvent and removes more unused code.

* Uses fprintf to implement SE_LOGD & SE_LOGE .
2018-05-31 14:08:20 +08:00
James Chen 442c149053 Implements Application::restart and some fixes. (#1253)
* Implements Application::restart.

* SAFE_DEC_REF should reset pointer to nullptr.

* Class::cleanup should be after of JSGlobalContextRelease.

* WebGLObject needs to be released if ScriptEngine is in cleanup process.

* Fixes memory leak in JSB_glGetActiveAttrib
2018-05-21 18:46:12 +08:00
minggo 4a13d0e15e Downsample (#1245)
* support render texture

* use texture unit 0

* add functions to set device pixel ratio

* add ccDeleteBuffers again

* fix according comments
2018-05-17 14:05:05 +08:00
James Chen 07cc734c8c setAnimationInterval -> setPreferredFramesPerSecond and binds setPreferredFramesPerSeconds. (#1244)
* setAnimationInterval -> setPreferredFramesPerSecond.

* Binds setPreferredFramesPerSeconds.

* typo fix in CCApplication-win32.cpp
2018-05-16 18:06:26 +08:00
Vincent Yang 0bb96987e7 [bug] android nativeFinish don't release some object. (#1241) 2018-05-14 18:06:15 +08:00
James Chen 727a4911d4 [runtime] Adds jsb.openURL, __getOSVersion, __getCurrentLanguage interfaces. (#1238) 2018-05-11 16:03:17 +08:00
Vincent Yang bdb941eb4a [bug] some jni methods don't declare JNICALL modifier. (#1236) 2018-05-11 10:44:41 +08:00
James Chen 57f8268e14 Display whether GL Opt mode is enabled! (#1216) 2018-04-26 16:46:40 +08:00
James Chen ae5c569345 Adds jsb.openDebugView interface, supports to display JSB invocation count. (#1214)
* Adds jsb.openDebugView interface, supports to display JSB invocation count.

* Removes unused log in JniImp.cpp.

* Removes unused log in Cocos2dxRenderer.java
2018-04-26 15:59:20 +08:00
James Chen f944be8574 Adds DebugView support. (#1203) 2018-04-20 14:53:16 +08:00
James Chen 2794f40efa Merge branch 'runtime' of git://github.com/cocos-creator/cocos2d-x-lite into runtime
# Conflicts:
#	cocos/platform/android/jni/JniImp.cpp
2018-04-19 13:50:34 +08:00
Vincent Yang 425033df4b Add nativeFinish JNI for destruct game script env. (#1197)
Add nativeFinish JNI for destruct game script env.
2018-04-17 11:38:59 +08:00
James Chen 58310293f2 more cache fix. 2018-04-14 15:59:18 +08:00
James Chen bf1b4f7124 [runtime] Audio works. (#1151) 2018-03-17 11:22:56 +08:00
James Chen 9b2aaf1cd0 getImageInfo is async method now. Clear autoreleasepool at the end of frame. (#1150) 2018-03-17 09:48:32 +08:00
James Chen 5122d14e24 [runtime] CocosRenderer.nativeInit supports to pass a default resource path. (#1149)
* FileUtils::setDefaultResourcePath fix.

* CocosRenderer.nativeInit supports to pass a default resource path.
2018-03-16 11:00:19 +08:00
James Chen c3602eb1e3 [runtime] Android testcase works. (#1148)
* Adds jsb_run_script_module for CommonJS module, reverts original `require`.

* Uses window.gameTick for sending tick event.

* Removes unused scripts.

* Android testcase works.
2018-03-15 18:12:38 +08:00
James Chen 2c3a86f7b1 [new-renderer] Label on android works. (#1146)
* Android HelloWorld without label works.

* Label on android works.
2018-03-14 21:19:51 +08:00
minggo 0d483a9b07 add back network (#1141)
* add back network

* add network back on windows
2018-03-09 16:20:48 +08:00
minggo cd0e15cd7f refactor android with new renderer (#1133) 2018-02-28 14:55:33 +08:00