1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00
Beef/BeefySysLib/HeadlessApp.cpp

27 lines
485 B
C++
Raw Permalink Normal View History

2019-08-23 11:56:54 -07:00
#include "HeadlessApp.h"
#include "platform/PlatformHelper.h"
USING_NS_BF;
void HeadlessApp::Init()
{
mRunning = true;
Beefy::String exePath;
BfpGetStrHelper(exePath, [](char* outStr, int* inOutStrSize, BfpResult* result)
{
BfpSystem_GetExecutablePath(outStr, inOutStrSize, (BfpSystemResult*)result);
});
mInstallDir = GetFileDir(exePath) + "/";
}
void HeadlessApp::Run()
{
while (mRunning)
{
BfpThread_Sleep((uint32)(1000 / mRefreshRate));
Process();
}
}