Ensure headless doesn't crash when profiler on.

Obviously, the frame profiler graph isn't very useful in headless (maybe
it could be?) but at least, it's nice to not have to change the .h and
rebuild all kinds of files when using headless for testing.
This commit is contained in:
Unknown W. Brackets 2015-05-30 12:53:57 -07:00
parent c87b7587ce
commit 90093faffc

View File

@ -7,6 +7,7 @@
#include <limits>
#include "file/zip_read.h"
#include "profiler/profiler.h"
#include "Common/FileUtil.h"
#include "Core/Config.h"
#include "Core/Core.h"
@ -201,6 +202,8 @@ bool RunAutoTest(HeadlessHost *headlessHost, CoreParameter &coreParameter, bool
int main(int argc, const char* argv[])
{
PROFILE_INIT();
#ifdef ANDROID_NDK_PROFILER
setenv("CPUPROFILE_FREQUENCY", "500", 1);
setenv("CPUPROFILE", "/sdcard/gmon.out", 1);