Commit Graph

13104 Commits

Author SHA1 Message Date
Arnold 1ceb222c7f concat path error (#19075)
when trying to remove dir `test0`, the function will build a pattern
like `"test0*.*"` rather than `test0/*.*`
2018-10-08 11:51:36 +08:00
Arnold 11339c4545 CCConsole: remove fd from _read_set when it is closed by client. (#19066)
* CCConsole: remove fd from _read_set when it is closed by client.

* simplify code

* remove comment
2018-10-08 11:50:28 +08:00
Arnold c61e45103c LUA: cc.downloader binding (#19078) 2018-10-08 10:42:24 +08:00
CocosRobot a59519a4ef [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#19082) 2018-09-28 23:38:04 -07:00
gestern 085ae2603f Fix several bugs with button's title (#19073)
* Fix several bugs with button's title:
(a)when using setTitleLabel() the button didn't resolve the corresponded parameters;
(b)bug with measurement accuracy (ignores the fractional part) of the system font and ttf-fonts sizes;
(c)bug with the size of the button title (by default) did not match the value size of the label's typeface;
(d)removes high coupling the typeface parameters of button because it already contains the used label

* Hotfix to call parent `Widget::init()`
2018-09-28 23:26:58 -07:00
dingdekai ebc32043ea [android] fix crash when point JNIEnv is a nullptr in getStringUTFCharsJNI func. (#19079) 2018-09-28 22:58:06 -07:00
leda 98120fb9d8
refactor cmake on use libs (#19054)
* link external build by modern cmake

* use "--whole-archive" for part android spec

* update travis

* update CI, add cmake tests on win32
2018-09-24 20:16:04 -07:00
CocosRobot a504c54a05 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#19068) 2018-09-21 10:03:47 +08:00
Arnold 6ea37d4c9d [linux] CCFileUtils::isFileExistInternal should reject a folder (#19062)
* accept regular file only

* simplify code
2018-09-21 10:02:19 +08:00
AIGRIND a6530a5aca Correct last delta time (#18898)
If next delta time was zeroed (via setNextDeltaTimeZero) the last update time was not corrected.
2018-09-20 18:03:30 +08:00
Billy O'Neal 6a52b3ff4a Add missing <functional> header which the standard requires and will be necessary to use std::function in VS2019. (#18989) 2018-09-20 17:49:15 +08:00
Arnold b170daf9d8 fix wrong parameter (#19060) 2018-09-20 15:19:10 +08:00
Arnold 53bed4fda3 DrawNode add isolate flag (#19056)
* add isolate flag

* add comment for DrawNode::visit

* add modifier: const/virtual

* update comment & change initializer
2018-09-20 15:18:03 +08:00
Arnold f8ed20e4b3 Android: CCFileUtils listFiles impl (#19044) 2018-09-19 18:05:16 +08:00
ggggamer 7d840ac6e1 CameraBackgroundDepthBrush should handle opengl recreate event. (#19037) 2018-09-18 09:14:27 +08:00
CocosRobot 16126f2571 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#19052) 2018-09-17 12:33:20 +08:00
leda e0210bd870
shorten the android build path, reduce long path error (#19045)
* remove import-add-path

* add module path into gradle

* modify PROP_BUILD_TYPE to ndk-build for tmp test

* import-module uv into ndk-build scripts

* part lib rename in Android.mk

* fix build path error on Lua&JS test project

* shorten all libs name, except external libs related

* "_static" suffix isn't necessary, since all internal build is static

* little catch

* re-change to cmake as default build type

* add both build type into Travis for android

* update external libs name

* fix gradlew cmd error

* update external config
2018-09-17 11:54:39 +08:00
Arnold f352225f14 CCFileUtils: improve thread safety (use single recursive_mutex) (#19046)
* CCFileUtils: add const modifier

* mac: add const

* android: add const

* use recursive_mutex

* win: add const modifier

* mac: revert

* android: add const

* rename __guard__ to mutexGuard
2018-09-17 10:47:41 +08:00
Arnold 3cad2a85d4 remove assert (#19047) 2018-09-17 10:21:43 +08:00
CocosRobot 2c37cc5ac6 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#19048) 2018-09-15 19:46:48 +08:00
gestern 368684d13d Android: Adds supporting edge screens (#19043)
* Android: Adds supporting edge screens

* Update CCGLViewImpl-android.h

* getSafeAreaRect(): Specifying indentation

Specifying indentation if the scale factor is different for grid
2018-09-15 16:45:22 +08:00
Arnold d9b2e0519d cocos2d::Data: prevent use after free. (#19034) 2018-09-14 14:36:47 +08:00
minggo 7dcee2bcf9
Remove ccglstatecache (#19013) 2018-09-11 14:39:30 +08:00
verketh 482c9eb8ca add image format check for Image::saveToFile in CCImage-ios.mm (#18986)
IOS保存灰度图崩溃
2018-09-10 16:35:31 +08:00
WangHe 3c8c5139c1 add error check for AVAudioSession setActive. (#19000) 2018-09-10 16:23:40 +08:00
Guilherme Gibertoni 6fb631e68e fix background music may resumes even though the application is on the background (#19005)
If the device is locked or sleeps
Then the application that was running on foreground will be dismissed and trigger a onWindowsFocusChanged(true) event while the game is already on background
2018-09-10 16:06:43 +08:00
ggggamer cf56f96a14 ClassLoader.loadClass use 'Binary names'. (#19011) 2018-09-10 15:06:19 +08:00
ggggamer f91ef9deee Fix some EVENT_RENDERER_RECREATED problem. (#19023)
* fix EVENT_RENDERER_RECREATED problem

* macro

* Event listener should add only once.
2018-09-10 15:04:35 +08:00
CHP 6a442192d4 Fix uninitialized variables problems found by drmemory (#19028) 2018-09-10 11:23:14 +08:00
TankorSmash 768ba5b6af add another xbox 360 configuration (#19032)
This is more a standard wired 360 controller.
2018-09-10 09:52:41 +08:00
Arnold 8d75c07dcb Upgrade dep libs (#19015)
* add libuv
* recompile libwebsocket 2.4.2 with libuv enabled
2018-09-06 16:07:25 +08:00
Arnold f99c81c336 https downloader timeout on win/mac (#18935) 2018-08-31 10:12:04 +08:00
Jeff Wang 925b727bb1 replace setColor with setTextColor for RichElementText (#18985) 2018-08-17 11:52:16 +08:00
CocosRobot e946c11eb3 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18982) 2018-08-07 11:24:27 +08:00
Jeff Wang 3948e5eece refine EditBox: add support for pressed and disabled image (#18965)
* refine EditBox add support for pressed and disabled image

* add test case

* fix compile error

* fix compatibility

* fix compile warning

* fix test cases

* remove CC_DEPRECATED_ATTRIBUTE mark
2018-08-07 09:29:51 +08:00
tyfkda aacec550c9 Fix out of range access in Label (#18789)
Out of range occurred in some condition
when using `Label` with its `getLetter()` member function.

`Label::recordPlaceholderInfo()` member function is called for
new line (\n) letter in `Label::multilineTextWrap()`,
but the function doesn't set `_lettersInfo[letterIndex].lineIndex`.

But `lineIndex` is used in `Label::updateLabelLetters()`
even if letter is new line.

This change checks `letterInfo.valid` to avoid
accessing `_linesOffsetX[letterInfo.lineIndex]`
for invalid (i.e. `NewLine`) letter.
2018-08-06 14:27:47 +08:00
saumyamukul dfa0360d99 Fix memory leaks (#18564) 2018-08-06 14:17:08 +08:00
ggggamer cddcf545db Node::draw and Node::visit use wrong arg type. (#18970)
Should we use `FLAGS_TRANSFORM_DIRTY` here?
2018-08-06 13:46:31 +08:00
raphael10241024 bad8091e99 fix bug:when download's http request didn't return Content-Length header, downloader will return a negative progress value (#18806) 2018-08-06 13:37:34 +08:00
panzhihao 5693097fce Keep the same performer of CCDownloader #18871 2018-08-06 12:38:14 +08:00
Jimmy Yin 4a3263d294 Lua: Optimize http header setting code (#18904) 2018-08-06 12:37:25 +08:00
Sylvain L. Kamdem d41820b14b Update UIAbstractCheckButton.cpp (#18858)
This factory method to create a checkbox instance was not working (UICheckBox.cpp:79):
CheckBox* CheckBox::create(const std::string& backGround,
                           const std::string& cross,
                           TextureResType texType)
Because the program tries to load missing textures. I just added some exit conditions to avoid it.
2018-08-06 11:46:19 +08:00
Riyachang c8c5fc74f7 Fix: LabelLetter::isVisible always returns false (#18975) 2018-08-06 10:09:48 +08:00
Arnold fc09d1af05 disable auto URI encode in AsyncHttp client, fix #18949 (#18957) 2018-07-23 21:32:52 +08:00
CHP 2bab501cac Update android build tools to 27.0.3 (#18952)
* Update gradle and android gradle plugin

* Update android build tools to 27.0.3
2018-07-22 13:58:58 +08:00
Arnold 81b1e904cd SocketIO#emit/send support multiple parameters (#18944) 2018-07-18 13:41:12 +08:00
Umair Javed ec1fc92e37 Added initialisation checks in pcm audio service (#18934) 2018-07-13 16:24:36 +08:00
leda 8d4ee80ac1
add test case for issue #18597(audio crash on iOS), and fix (#18865)
* use atomic_bool type for _isRotateThreadExited

* add test case for issues 18597

* fix test case error

* add data race comments, fix lock usage error

* add comments for audioplayer

* fix typo in comments

* revert wrong changes

* update test case, keep reproduce

* add alSourceUnqueueBuffers before stop

* improve UnqueueBuffers

* detail test case to show side effect

* remove unused comments

* add comments for AudioPlayer change

* correct a audio log level

* change log level from W to VV

* update time step, add play state check

* remove record time of UnqueueBuffers
2018-07-11 09:36:57 +08:00
Koveshnikov Peter e27f33a74b Issue18909 Widget::getAncestorWidget fix (#18913) 2018-07-10 23:02:37 +08:00
newnon df4d8e75f6 Fix websocket memory zereoing (#18643) 2018-07-10 22:57:05 +08:00