Commit Graph

80 Commits

Author SHA1 Message Date
Zeqiang Li e64301ad34 3.5.0 swappy (#10327)
* gles2/3 swappy
* vk swappy
* manually fallback in GL

Co-authored-by: Zeqiang Li <zeqiang-li@outlook.com.com>
2022-03-24 15:37:38 +08:00
Yun Hsiao Wu 14a17c9d22 license upgrade (#4210) 2022-01-24 17:18:47 +08:00
minggo c0bdd3c0d8 Merge branch 'v3.4.1' into merge_v3.4.1
Conflicts:
	cocos/bindings/event/EventDispatcher.cpp
	cocos/platform/android/jni/JniCocosActivity.cpp
	cocos/platform/apple/JsbBridge.mm
	cocos/platform/java/jni/JniCocosOrientationHelper.cpp
	cocos/platform/win32/CanvasRenderingContext2D-win32.cpp
2022-01-07 18:36:14 +08:00
江战 ff533953ab allow tick() in background (#4083) 2021-12-21 15:50:45 +08:00
qiuguohua eeb9d5c689 Merge the code of v3.3.1 platform adaptation layer into the development branch (#3958)
* 1、Merge platform adaptation layer code into the development branch
2、It passed the test in windows and ohos system

* 1、Merge platform adaptation layer code into the development branch
2、It passed the test in windows and ohos system

* 1、Fix github compile windows error

* 1、Fix github compile windows error

* 1. Adjust the code format;
2. Fix js automatic generation binding
3. Adjust github CI compilation

* 1. Adjust the code format;
2. Fix js automatic generation binding
3. Adjust github CI compilation

* Solve mac and ios compilation failure

* Fix the problem of compilation of Windows-side simulator

* 1. Adapt the simulator to a new adaptation layer;
2. Fix the compilation warning of ios, and the implicit conversion failed;
3. Fix the mac compilation error, due to the problem of adding the link identification -all_load;

* 1.Add the isDisplayStats and setDisplayStats method to the screen interface

* Fix clang-tidy compilation warning

* Fix clang-tidy compilation warning

* Repair the emulator, compatible with mac and win

* 1、Repair detailed errors, including name modification and calling method modification
2、Delete redundant files in the template directory
3、Change the vibrate interface to vibrator
4、Fix word spelling errors

* Rename interfaces to modules

* Replace CC_ASSERT with CCASSERT

* Replace CC_ASSERT with CCASSERT

Co-authored-by: qiuguohua <>
2021-10-27 10:51:02 +08:00
江战 4d2d4d82b5 3.3 some optimization (#3765) 2021-07-27 13:40:02 +08:00
Yun Hsiao Wu 5c88f24b3f misc gfx & fg improvements (#3703) 2021-07-13 14:07:47 +08:00
ref-ptr 34521945db fix vulkan-backend crash on android (#3700) 2021-07-08 16:52:59 +08:00
PP cbab5dd687 fix application lifecycle issue on Android platform (#3478) 2021-06-09 12:01:26 +08:00
江战 a6d3d415a5 3.3 ohos fix compile error (#3586) 2021-06-01 16:56:38 +08:00
江战 a652715f5a Harmony OS support - dont merge (#3528) 2021-05-21 10:43:22 +08:00
Yun Hsiao Wu e0fdfef054 license upgrader 2021-02-05 14:08:22 +08:00
minggo 826babfa64 Format code (#3217) 2021-01-13 14:49:32 +08:00
minggo a728537098 add license (#3165) 2020-12-29 11:25:30 +08:00
PP 8e561c9cfc remove Device::Rotation (#3140) 2020-12-25 17:27:15 +08:00
minggo b78d759b6a get video properties in gl thread to avoid dead lock (#3137)
ui thread may wait for gl thread to enter pause state, if the same time gl thread get video properties in ui thread and wait for it, then dead lock happens
2020-12-22 14:34:53 +08:00
吴智明 7d55ad729a 3d gfx add orientation change event (#3135) 2020-12-22 10:59:18 +08:00
minggo 3ea4c5c9a5 fix crash if return from background (#3082) 2020-11-30 15:24:41 +08:00
minggo 4a5df08f19 fix android command order after coming from background (#3030) 2020-11-16 14:21:55 +08:00
吴智明 4dc6a9f67c change android package name (#3006) 2020-11-11 10:55:10 +08:00
minggo 3fc5d1d76d 3d gfx use java activity (#2990)
* use java activity

* simplify codes

* initialize app

* first version of touch handler

* fix touch event's bug

* add keycode event support for android

* add sensor adapt

* add copyright header

* add webview support

* support video player

* add missing property

* add editor box support

* handle crash if come from background on Android

* update external version

Co-authored-by: wuzhiming <wuzhiming.chukong@gmail.com>
2020-11-07 17:38:33 +08:00
江战 a0d5b38eb8 Fix crash below android4.4 when the class cannot be found … (#2839) 2020-09-28 10:34:13 +08:00
minggo b08407c501 remove CC/cc prefix for file names (#2728) 2020-08-28 15:23:29 +08:00
minggo d381a16142 change namespace from cocos2d to cc (#2572) 2020-06-16 14:34:46 +08:00
江战 f0d2b6d268 update (#2459) 2020-05-19 14:21:14 +08:00
江战 1748a533a7 init pthread key p_key (#2460) 2020-05-19 14:02:12 +08:00
minggo 96cbe1e971 Android adapt (#2410)
* simplify get obb file path

* not get package name throung jni

* not get sdk version from android

* remove unneeded codes

* remove convertEncoding

* remove unneeded codes'

* remove unneeded codes

* simpify codes

* simplify codes

* remove unneeded codes
2020-04-27 17:14:06 +08:00
minggo 2d3010f546 Editbox (#2294)
* mac support editbox

* fix compiling/runtime issue for iOS/Android

* prevent handling touch event if it is prevented

* make editbox work

* fix effect of editbox on android
2020-03-19 13:46:31 +08:00
minggo 7ac05e123f remove unneed codes (#2180) 2020-02-25 16:04:18 +08:00
minggo dda8760df0 remove unneed codes (#2176)
* remove unneed codes

* remove unneed codes
2020-02-25 11:04:50 +08:00
minggo e693d0a237 get audio output sample rate and output frame count in C++ (#2175) 2020-02-24 18:14:00 +08:00
minggo adb387ada5 remove unneeded codes and fix jni implementation (#2154) 2020-02-20 12:03:14 +08:00
minggo bb6b022d3a use native activity on Android (#2094) 2020-01-19 09:52:46 +08:00
knox 7f68a97cda improve getCurrentLanguage to android 2019-07-26 16:45:31 +08:00
minggo 875acde984 native returns unpremultiplied data (#1765)
* unpremultiply alpha on ios/mac

* unpremultiply alpha on Android and windows
2019-07-02 15:00:15 +08:00
Arnold 5502000bc6 prevent downloader callbacks when app exits (#1763) 2019-06-04 02:21:04 -07:00
Wenhai Lin b8ae263cd2 Copy text to clipboard (#1667) 2019-01-28 10:14:34 +08:00
leda 7c93a11905 runtime require: add context2d fill/rect method for android (#1561)
* add context2d fill & rect method for android

* workaround: draw a hairline to cover the border

* fix clear&fillrect parameter error

* add empty impl on Apple

* add empty Imple in win32

* enable "SUBPIXEL_TEXT_FLAG" flag to make the text more clear on Android

* move putImageData impl to native

* add empty _fillImageData impl on win32 & apple
2018-10-26 13:44:03 +08:00
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
minggo 139cc8b7ed jni support passing null string to java (#1469) 2018-08-22 17:25:25 +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