diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2019-04-30 13:12:35 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2019-04-30 13:12:35 +0200 |
commit | 868ba6279a20e4d1412c2d576c67400167de6694 (patch) | |
tree | a7090b2da96987c4c532c5bedf812df20f604964 /src/Game.cpp | |
parent | Second iteration of changing to single-threaded model (diff) | |
download | AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.tar AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.tar.gz AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.tar.bz2 AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.tar.lz AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.tar.xz AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.tar.zst AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.zip |
Diffstat (limited to 'src/Game.cpp')
-rw-r--r-- | src/Game.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Game.cpp b/src/Game.cpp index a3f2b50..d67072e 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -2,6 +2,8 @@ #include <memory> +#include <optick.h> + #include "Render.hpp" #include "GameState.hpp" #include "NetworkClient.hpp" @@ -127,7 +129,6 @@ void InitEvents() { default: break; } - LOG(INFO) << "Changed key"; }); listener.RegisterHandler("MouseMove", [](const Event& eventData) { @@ -171,6 +172,7 @@ void InitEvents() { } void RunGame() { + OPTICK_THREAD("Main"); InitEvents(); timer = std::make_unique<LoopExecutionTimeController>(std::chrono::milliseconds(16)); @@ -180,6 +182,7 @@ void RunGame() { SetState(State::MainMenu); while (isRunning) { + OPTICK_FRAME("MainThread"); listener.HandleAllEvents(); if (gs) { if (GetState() == State::Playing) { |