mirror of https://github.com/axmolengine/axmol.git
Merge: 6be52c29e7
9d7d1e40fb
Merge branch 'master' of https://github.com/c4games/engine-x into master
This commit is contained in:
parent
6df5f91142
commit
d0c01ea688
|
@ -2,6 +2,7 @@
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010 cocos2d-x.org
|
||||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||||
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
||||||
|
Copyright (c) 2020 c4games.com
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
@ -28,6 +29,13 @@ THE SOFTWARE.
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <signal.h>
|
||||||
|
#if !defined(_WIN32)
|
||||||
|
// for unix/linux kill
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "md5/md5.h"
|
#include "md5/md5.h"
|
||||||
|
|
||||||
#include "base/CCDirector.h"
|
#include "base/CCDirector.h"
|
||||||
|
@ -721,6 +729,15 @@ std::string bin2hex(const std::string& binary /*charstring also regard as binary
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void killCurrentProcess()
|
||||||
|
{
|
||||||
|
#if !defined(_WIN32)
|
||||||
|
::kill(::getpid(), SIGKILL);
|
||||||
|
#else
|
||||||
|
::TerminateProcess(::GetCurrentProcess(), SIGTERM);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010 cocos2d-x.org
|
||||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||||
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
||||||
|
Copyright (c) 2020 c4games.com
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
@ -258,6 +259,14 @@ namespace utils
|
||||||
* @lua NA
|
* @lua NA
|
||||||
*/
|
*/
|
||||||
CC_DLL std::string bin2hex(const std::string& binary /*charstring also regard as binary in C/C++*/, int delim = -1, bool prefix = false);
|
CC_DLL std::string bin2hex(const std::string& binary /*charstring also regard as binary in C/C++*/, int delim = -1, bool prefix = false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief killCurrentProcess immidiately, any object's destructor never call
|
||||||
|
@return NA.
|
||||||
|
* @js NA
|
||||||
|
* @lua NA
|
||||||
|
*/
|
||||||
|
CC_DLL void killCurrentProcess();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
Loading…
Reference in New Issue