This commit is contained in:
Attila Uygun 2023-05-26 14:49:53 +02:00
parent 231efe1c92
commit 2f0a2f52eb
3 changed files with 9 additions and 5 deletions

View File

@ -84,14 +84,12 @@ void Engine::Run() {
// Subdivide the frame time using fixed time steps. // Subdivide the frame time using fixed time steps.
while (accumulator >= time_step_) { while (accumulator >= time_step_) {
TaskRunner::GetThreadLocalTaskRunner()->SingleConsumerRun(); TaskRunner::GetThreadLocalTaskRunner()->SingleConsumerRun();
platform_->Update(); platform_->Update();
Update(time_step_); Update(time_step_);
if (platform_->should_exit()) {
return;
}
accumulator -= time_step_; accumulator -= time_step_;
if (platform_->should_exit())
return;
}; };
// Calculate frame fraction from remainder of the frame time. // Calculate frame fraction from remainder of the frame time.
@ -100,6 +98,8 @@ void Engine::Run() {
} }
void Engine::Initialize() { void Engine::Initialize() {
LOG << "Initializing engine.";
thread_pool_.Initialize(); thread_pool_.Initialize();
CreateRenderer(true); CreateRenderer(true);

View File

@ -338,6 +338,8 @@ void Platform::HandleCmd(android_app* app, int32_t cmd) {
} }
Platform::Platform(android_app* app) { Platform::Platform(android_app* app) {
LOG << "Initializing platform.";
app_ = app; app_ = app;
mobile_device_ = true; mobile_device_ = true;

View File

@ -14,6 +14,8 @@ namespace eng {
void KaliberMain(Platform* platform); void KaliberMain(Platform* platform);
Platform::Platform() { Platform::Platform() {
LOG << "Initializing platform.";
root_path_ = "../../"; root_path_ = "../../";
LOG << "Root path: " << root_path_.c_str(); LOG << "Root path: " << root_path_.c_str();